always update on save
This commit is contained in:
parent
df947f9523
commit
54922ab21a
1 changed files with 2 additions and 1 deletions
|
@ -37,7 +37,8 @@ class Item(models.Model):
|
||||||
user = models.ForeignKey(User, null=True, related_name='items', on_delete=models.CASCADE)
|
user = models.ForeignKey(User, null=True, related_name='items', on_delete=models.CASCADE)
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
if self.url and not self.data.get("url") == self.url:
|
#if self.url and not self.data.get("url") == self.url:
|
||||||
|
if self.url:
|
||||||
self.update_data()
|
self.update_data()
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue