Skip to content

Commit

Permalink
return missing/not missing instead of T/F
Browse files Browse the repository at this point in the history
  • Loading branch information
henri123lemoine committed Aug 5, 2023
1 parent 69138bf commit 99f456a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions align_data/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def verify_fields(self):
missing = [field for field in self.__id_fields if not getattr(self, field)]
if missing:
logger.warning(f'Entry is missing the following fields: {missing}')
return False
return True
return 'missing'
return 'not_missing'

@classmethod
def before_write(cls, mapper, connection, target):
Expand All @@ -100,7 +100,7 @@ def before_write(cls, mapper, connection, target):
return

# Verify required fields
if target.verify_fields():
if target.verify_fields() == 'not_missing':
target.incomplete = False
target.pinecone_update_required = True
else:
Expand Down

0 comments on commit 99f456a

Please sign in to comment.