Sapan Bhatia | a46cc4d | 2017-04-21 14:57:54 +0200 | [diff] [blame] | 1 | def __init__(self, *args, **kwargs): |
Scott Baker | 2d20057 | 2017-05-25 10:52:00 -0700 | [diff] [blame] | 2 | onos_services = ONOSService.objects.all() |
Sapan Bhatia | a46cc4d | 2017-04-21 14:57:54 +0200 | [diff] [blame] | 3 | if onos_services: |
Scott Baker | 8d8f992 | 2017-07-17 17:30:42 -0700 | [diff] [blame] | 4 | self._meta.get_field("owner").default = onos_services[0].id |
Sapan Bhatia | a46cc4d | 2017-04-21 14:57:54 +0200 | [diff] [blame] | 5 | super(ONOSApp, self).__init__(*args, **kwargs) |
6 |