mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 13:35:23 +02:00
fixed UUID check
This commit is contained in:
parent
1e4dbe4e95
commit
59cd68d54a
1 changed files with 5 additions and 1 deletions
|
@ -140,6 +140,10 @@ class RepositoryRecipes(RepositoryGeneric[Recipe, RecipeModel]):
|
|||
if isinstance(i, UUID):
|
||||
ids.append(i)
|
||||
else:
|
||||
try:
|
||||
i_as_uuid = UUID(i)
|
||||
ids.append(i_as_uuid)
|
||||
except ValueError:
|
||||
slugs.append(i)
|
||||
additional_ids = self.session.execute(select(model.id).filter(model.slug.in_(slugs))).scalars().all()
|
||||
return ids + additional_ids
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue