Skip to content

Commit

Permalink
fix model id none fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
sidhulyalkar committed Oct 5, 2023
1 parent 141d301 commit 24e2f3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion element_facemap/train_facial_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def make(self, key):
# Insert newly trained model results into FacemapModel table
try:
model_ids = facemap_pose.FacemapModel.fetch("model_id")
if len(model_id) == 0 or model_id in model_ids:
if model_id is None or model_id in model_ids:
model_id = max(model_ids) + 1
except ValueError: # case that nothing has been inserted
model_id = 0
Expand Down

0 comments on commit 24e2f3b

Please sign in to comment.