fixed a null create bug due to write not checking if id is set
This commit is contained in:
parent
d6c946dcd0
commit
0c78f7314f
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ class CalendarEvent(models.Model):
|
|||
|
||||
def write(self, vals):
|
||||
res = super(CalendarEvent, self).write(vals)
|
||||
if not self.env.context.get('caldav_no_sync'):
|
||||
if not self.env.context.get('caldav_no_sync') and self.id:
|
||||
try:
|
||||
_logger.debug(f"Updating event {self.name} in CalDAV")
|
||||
self.sync_update_to_caldav()
|
||||
|
|
|
|||
Loading…
Reference in a new issue