mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-18 14:02:15 +00:00
FEAT: Add associated assets to supplier detail view
This commit is contained in:
@@ -51,6 +51,14 @@ class Supplier(models.Model, RevisionMixin):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
@property
|
||||
def assets(self):
|
||||
p = []
|
||||
for e in Asset.objects.filter(purchased_from=self):
|
||||
p.append(e)
|
||||
|
||||
return p
|
||||
|
||||
|
||||
class Connector(models.Model):
|
||||
description = models.CharField(max_length=80)
|
||||
|
||||
Reference in New Issue
Block a user