Skip to content

Commit

Permalink
fix an issue where we blow away children when we don't mean to. (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
gagelarsen authored Oct 1, 2024
1 parent 7babf45 commit c1a5cdf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tethysext/atcore/controllers/app_users/modify_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ def _handle_modify_resource_requests(self, request, resource_id=None, *args, **k
# Look up existing resource
if editing:
resource = session.query(_Resource).get(resource_id)

if not resource:
raise ATCoreException('Unable to find {}'.format(
_Resource.DISPLAY_TYPE_SINGULAR.lower()
Expand All @@ -189,11 +188,12 @@ def _handle_modify_resource_requests(self, request, resource_id=None, *args, **k
# Reset the organizations
resource.organizations = []

# Reset the parents
resource.parents = []
if self.enable_relationship_fields:
# Reset the parents
resource.parents = []

# Reset the children
resource.children = []
# Reset the children
resource.children = []

# Otherwise create a new project
else:
Expand Down

0 comments on commit c1a5cdf

Please sign in to comment.