Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix issue #629 #632

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion g3w-admin/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
logger.warning('Celery could not be imported, this might be ok if there are no custom suite modules that require Celery')


__version__ = (3, 6, 0, 'unstable', 0)
__version__ = (0, 0, 0, 'unstable', 0)
4 changes: 2 additions & 2 deletions g3w-admin/editing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def form_valid(self, form):

# give permission to viewers:
toAdd = toRemove = None
if self.activated.pk:
if self.activated and self.activated.pk:
currentViewerUsers = [int(i) for i in form.cleaned_data['viewer_users']]
toRemove = list(set(self.initial_viewer_users) - set(currentViewerUsers))
toAdd = list(set(currentViewerUsers) - set(self.initial_viewer_users))
Expand All @@ -296,7 +296,7 @@ def form_valid(self, form):

# give permission to user groups viewers:
to_add = to_remove = None
if self.activated.pk:
if self.activated and self.activated.pk:
current_user_groups_viewers = [int(i) for i in form.cleaned_data['user_groups_viewer']]
to_remove = list(set(self.initial_viewer_user_groups) - set(current_user_groups_viewers))
to_add = list(set(current_user_groups_viewers) - set(self.initial_viewer_user_groups))
Expand Down
Loading