diff --git a/arches/app/models/tile.py b/arches/app/models/tile.py index 4b5af19946..7b7ccc0586 100644 --- a/arches/app/models/tile.py +++ b/arches/app/models/tile.py @@ -472,14 +472,11 @@ def save(self, *args, **kwargs): self.check_for_missing_nodes() self.check_for_constraint_violation() - creating_new_tile = ( - models.TileModel.objects.filter(pk=self.tileid).exists() is False - ) - edit_type = "tile create" if (creating_new_tile is True) else "tile edit" + existing_model = models.TileModel.objects.filter(pk=self.tileid).first() + creating_new_tile = existing_model is None + edit_type = "tile create" if creating_new_tile else "tile edit" - if creating_new_tile is False: - existing_model = models.TileModel.objects.get(pk=self.tileid) - else: + if not creating_new_tile: self.populate_missing_nodes() # this section moves the data over from self.data to self.provisionaledits if certain users permissions are in force