Sapan Bhatia | ce657e6 | 2017-04-21 14:20:41 +0200 | [diff] [blame^] | 1 | def __init__(self, *args, **kwargs): |
| 2 | exampleservice = ExampleService.get_service_objects().all() |
| 3 | if exampleservice: |
| 4 | self._meta.get_field('provider_service').default = exampleservice[0].id |
| 5 | super(ExampleTenant, self).__init__(*args, **kwargs) |
| 6 | |
| 7 | def save(self, *args, **kwargs): |
| 8 | super(ExampleTenant, self).save(*args, **kwargs) |
| 9 | model_policy_exampletenant(self.pk) |
| 10 | |
| 11 | def delete(self, *args, **kwargs): |
| 12 | self.cleanup_container() |
| 13 | super(ExampleTenant, self).delete(*args, **kwargs) |
| 14 | |