summaryrefslogtreecommitdiff
path: root/app/notes/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/notes/models.py')
-rw-r--r--app/notes/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/notes/models.py b/app/notes/models.py
index 4e7824d..698ca14 100644
--- a/app/notes/models.py
+++ b/app/notes/models.py
@@ -31,7 +31,7 @@ class LuxNote(models.Model):
body_html = models.TextField(blank=True)
body_markdown = models.TextField('Note')
point = models.PointField(blank=True, null=True)
- location = models.ForeignKey(Location, blank=True, null=True)
+ location = models.ForeignKey(Location, on_delete=models.CASCADE, blank=True, null=True)
PUB_STATUS = (
(0, 'Draft'),
(1, 'Published'),
@@ -88,7 +88,7 @@ class Note(models.Model):
date_created = models.DateTimeField('Date', blank=True)
date_last_updated = models.DateTimeField('Date', blank=True)
point = models.PointField()
- location = models.ForeignKey(Location, null=True, blank=True)
+ location = models.ForeignKey(Location, on_delete=models.CASCADE, null=True, blank=True)
city_name = models.CharField(max_length=250, null=True, blank=True)
state_name = models.CharField(max_length=250, null=True, blank=True)
country_name = models.CharField(max_length=150, null=True, blank=True)