Looks good to me.
HUE-8792: [notebook] Error while share documents(user can save document with only read permissions)
Review Request #13800 — Created April 5, 2019 and submitted
From f0d07aa9aad1fc6108b7d7838a49ce495b60c8b6 Mon Sep 17 00:00:00 2001
From: Mykhailo Kysliuk firstname.lastname@example.org
Date: Fri, 5 Apr 2019 18:42:15 +0300
Subject: [PATCH] HUE-8792: [notebook] Error while share documents(user can
save document with only read permissions)
Manual on Chrome.
Looking back at this, is there a reason why we wouldn't just check for the presence of parentSavedQueryUuid instead of checking isHistory?
Document2.objects.get(uuid=notebook['parentSavedQueryUuid']) if notebook.get('parentSavedQueryUuid') else \
Let's create a method for this check and reuse here:
I would need to think a bit more as tricky but important, but the good behavior could be to offer the 'save as', like a read only query can be 'saved as'?
Here is might be an issue with the save method too https://github.com/cloudera/hue/blob/master/desktop/libs/notebook/src/notebook/api.py#L336 (if not W perm on parent document, we go in the save as)