forked from 0x2620/pandora
resolve entity to name, get_by_name for add/edit annotation api calls
This commit is contained in:
parent
d061bbe33f
commit
901bd37e90
3 changed files with 22 additions and 5 deletions
|
|
@ -229,6 +229,7 @@ class Annotation(models.Model):
|
|||
try:
|
||||
entity = Entity.get(self.value)
|
||||
j['entity'] = entity.json(user=user)
|
||||
j['value'] = entity.name
|
||||
except:
|
||||
j['entity'] = {}
|
||||
elif l['type'] == 'event':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue