|
|
|
@ -436,8 +436,13 @@ class AbonRawPassword(models.Model): |
|
|
|
|
|
|
|
def abon_post_save(sender, instance, **kwargs): |
|
|
|
timeout = None |
|
|
|
if hasattr(instance, 'is_dhcp') and instance.is_dhcp(): |
|
|
|
timeout = getattr(settings, 'DHCP_TIMEOUT', 14400) |
|
|
|
if hasattr(instance, 'is_dhcp'): |
|
|
|
if callable(instance.is_dhcp): |
|
|
|
if instance.is_dhcp(): |
|
|
|
timeout = getattr(settings, 'DHCP_TIMEOUT', 14400) |
|
|
|
else: |
|
|
|
if instance.is_dhcp: |
|
|
|
timeout = getattr(settings, 'DHCP_TIMEOUT', 14400) |
|
|
|
agent_abon = instance.build_agent_struct() |
|
|
|
if agent_abon is None: |
|
|
|
return True |
|
|
|
|