Sapan Bhatia | 084c098 | 2017-04-21 14:47:40 +0200 | [diff] [blame] | 1 | sync_attributes = ( 'test', 'argument', "scope" ) |
| 2 | |
| 3 | def __init__(self, *args, **kwargs): |
Scott Baker | 379404c | 2017-05-24 17:13:45 -0700 | [diff] [blame] | 4 | vtr_services = VTRService.objects.all() |
Sapan Bhatia | 084c098 | 2017-04-21 14:47:40 +0200 | [diff] [blame] | 5 | if vtr_services: |
Scott Baker | c7958a9 | 2017-07-18 11:07:00 -0700 | [diff] [blame^] | 6 | self._meta.get_field("owner").default = vtr_services[0].id |
Sapan Bhatia | 084c098 | 2017-04-21 14:47:40 +0200 | [diff] [blame] | 7 | super(VTRTenant, self).__init__(*args, **kwargs) |
| 8 | |
| 9 | def save(self, *args, **kwargs): |
| 10 | super(VTRTenant, self).save(*args, **kwargs) |
| 11 | |
| 12 | def delete(self, *args, **kwargs): |
| 13 | super(VTRTenant, self).delete(*args, **kwargs) |
| 14 | |