hide private items from friends in search
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
93335b2776
commit
f4894d3a8c
4 changed files with 38 additions and 11 deletions
|
|
@ -24,7 +24,8 @@ def inventory_items(identity):
|
|||
for friend in identity.friends.all():
|
||||
if friend_user := friend.user.get():
|
||||
for item in friend_user.inventory_items.all():
|
||||
yield item
|
||||
if item.availability_policy != 'private':
|
||||
yield item
|
||||
|
||||
|
||||
class InventoryItemViewSet(viewsets.ModelViewSet):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue