From 2216758e4343a0c022e0f6c33ba95e616c129e88 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Sat, 21 Jul 2018 15:24:48 -0400 Subject: [PATCH] pycodestyle cleanup --- netbox/dcim/models.py | 2 -- netbox/extras/middleware.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 7004d8e4d..ca18cbb25 100644 --- a/netbox/dcim/models.py +++ b/netbox/dcim/models.py @@ -631,7 +631,6 @@ class RackReservation(ChangeLoggedModel): max_length=100 ) - class Meta: ordering = ['created'] @@ -1847,7 +1846,6 @@ class Interface(ComponentModel): objects = InterfaceQuerySet.as_manager() tags = TaggableManager() - class Meta: ordering = ['device', 'name'] unique_together = ['device', 'name'] diff --git a/netbox/extras/middleware.py b/netbox/extras/middleware.py index 30881a5f7..e92f5692e 100644 --- a/netbox/extras/middleware.py +++ b/netbox/extras/middleware.py @@ -26,7 +26,7 @@ def mark_object_changed(instance, **kwargs): We have to wait until the *end* of the request to the serialize the object, because related fields like tags and custom fields have not yet been updated when the post_save signal is emitted. """ - if hasattr(instance, 'log_change') and not instance.__class__._meta.verbose_name in WEBHOOK_MODELS: + if hasattr(instance, 'log_change') and instance.__class__._meta.verbose_name not in WEBHOOK_MODELS: return # Determine what action is being performed. The post_save signal sends a `created` boolean, whereas post_delete