[FIX] unlink bi_sql_view without cron

This commit is contained in:
Pierrick Brun
2023-06-15 14:10:31 +02:00
committed by chien
parent ea4a6e4324
commit 60de210dff

View File

@@ -263,7 +263,8 @@ class BiSQLView(models.Model):
"If you want to delete them, first set them to draft."
)
)
self.cron_id.unlink()
if self.cron_id:
self.cron_id.unlink()
return super().unlink()
def copy(self, default=None):