mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
feat(people): Add detail views for Person and Relationship
This commit is contained in:
@@ -29,6 +29,12 @@ class Person(models.Model):
|
||||
through='Relationship',
|
||||
through_fields=('source', 'target'),
|
||||
symmetrical=False)
|
||||
|
||||
@property
|
||||
def relationships(self):
|
||||
return self.relationships_as_source.all().union(
|
||||
self.relationships_as_target.all()
|
||||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.name
|
||||
|
||||
Reference in New Issue
Block a user