Skip to content

Commit

Permalink
allow null entity
Browse files Browse the repository at this point in the history
  • Loading branch information
rdahis committed Jul 26, 2024
1 parent 909e9b4 commit b41b57c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/apps/api/v1/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,13 @@ def raw_data_source_last_updated_at(self):

class Update(BaseModel):
id = models.UUIDField(primary_key=True, default=uuid4)
entity = models.ForeignKey("Entity", on_delete=models.CASCADE, related_name="updates")
entity = models.ForeignKey(
"Entity",
blank=True,
null=True,
on_delete=models.CASCADE,
related_name="updates"
)
frequency = models.IntegerField(blank=True, null=True)
lag = models.IntegerField(blank=True, null=True)
latest = models.DateTimeField(blank=True, null=True)
Expand Down

0 comments on commit b41b57c

Please sign in to comment.