|
|
|
@ -390,4 +390,13 @@ class AnexoNormaJuridica(models.Model): |
|
|
|
return models.Model.save(self, force_insert=force_insert, |
|
|
|
force_update=force_update, |
|
|
|
using=using, |
|
|
|
update_fields=update_fields) |
|
|
|
update_fields=update_fields) |
|
|
|
|
|
|
|
def delete(self, using=None, keep_parents=False): |
|
|
|
anexo_arquivo = self.anexo_arquivo |
|
|
|
result = super().delete(using=using, keep_parents=keep_parents) |
|
|
|
|
|
|
|
if anexo_arquivo: |
|
|
|
anexo_arquivo.delete(save=False) |
|
|
|
|
|
|
|
return result |
|
|
|
|