Home Information - Your home, your data, organized.
Python
Add ordering Meta for order_id in other Attribute model subclasses
Anthony Cassandra726f0e858acd
diff --git a/src/hi/apps/config/models.py b/src/hi/apps/config/models.pyindex d0dc5d2f..16da9d95 100644--- a/src/hi/apps/config/models.py+++ b/src/hi/apps/config/models.py@@ -47,6 +47,7 @@ class SubsystemAttribute( AttributeModel ):class Meta:verbose_name = 'Subsystem Attribute'verbose_name_plural = 'Subsystem Attributes'+ ordering = ['order_id', 'id']def get_upload_to(self):return 'settings/'diff --git a/src/hi/apps/location/models.py b/src/hi/apps/location/models.pyindex c71e8f10..c4280993 100644--- a/src/hi/apps/location/models.py+++ b/src/hi/apps/location/models.py@@ -121,6 +121,7 @@ class LocationAttribute( AttributeModel ):indexes = [models.Index( fields=[ 'name', 'value' ] ),]+ ordering = ['order_id', 'id']def get_upload_to(self):return 'location/attributes/'diff --git a/src/hi/integrations/models.py b/src/hi/integrations/models.pyindex e43485a9..d445c5fb 100644--- a/src/hi/integrations/models.py+++ b/src/hi/integrations/models.py@@ -59,6 +59,7 @@ class IntegrationAttribute( AttributeModel ):class Meta:verbose_name = 'Attribute'verbose_name_plural = 'Attributes'+ ordering = ['order_id', 'id']def get_upload_to(self):return 'integration/attributes/'