add virtual item field 'returned' in item
This commit is contained in:
parent
83565d4b2a
commit
2e29b8b046
3 changed files with 62 additions and 15 deletions
|
@ -13,6 +13,9 @@ class ItemManager(SoftDeleteManager):
|
|||
kwargs['uid'] = uid
|
||||
return super().create(**kwargs)
|
||||
|
||||
def get_queryset(self):
|
||||
return super().get_queryset().filter(returned_at__isnull=True)
|
||||
|
||||
|
||||
class Item(SoftDeleteModel):
|
||||
iid = models.AutoField(primary_key=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue