mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-25 18:15:40 +00:00
fix error when item doesn't have photo attachment
This commit is contained in:
parent
d1d98bcb06
commit
3f455cb574
1 changed files with 1 additions and 0 deletions
|
@ -845,6 +845,7 @@ func (e *ItemsRepository) SetPrimaryPhotos(ctx context.Context, GID uuid.UUID) (
|
||||||
Where(
|
Where(
|
||||||
item.HasGroupWith(group.ID(GID)),
|
item.HasGroupWith(group.ID(GID)),
|
||||||
item.HasAttachmentsWith(
|
item.HasAttachmentsWith(
|
||||||
|
attachment.TypeEQ(attachment.TypePhoto),
|
||||||
attachment.Not(
|
attachment.Not(
|
||||||
attachment.And(
|
attachment.And(
|
||||||
attachment.Primary(true),
|
attachment.Primary(true),
|
||||||
|
|
Loading…
Reference in a new issue