Skip to content

Commit

Permalink
fix ProjectForm get_owner() call (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Feb 29, 2024
1 parent e3ce6a2 commit 57c9c51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projectroles/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,8 @@ def __init__(self, project=None, current_user=None, *args, **kwargs):
def clean(self):
"""Function for custom form validation and cleanup"""
self.instance_owner_as = (
self.instance.get_owner() if self.instance else None
)
self.instance.get_owner() if self.instance.pk else None
) # Must check pk, get_owner() with unsaved model fails in Django v4+
disable_categories = getattr(
settings, 'PROJECTROLES_DISABLE_CATEGORIES', False
)
Expand Down

0 comments on commit 57c9c51

Please sign in to comment.