Skip to content
Snippets Groups Projects
Commit b1837f8c authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

use preferences_groups order when available

parent 1dcc2d01
No related branches found
No related tags found
No related merge requests found
Pipeline #26547 passed
......@@ -99,13 +99,19 @@ class UserPreferencesAbstractModel(models.Model):
@classmethod
def get_allowed_fields(cls):
if cls.preferences_groups is not None:
for group, fields in cls.preferences_groups.items():
for f in fields:
yield f
return
for field_name in [f.name for f in cls._meta.get_fields()]:
if field_name == "id" or field_name == "pk" or field_name == "user":
continue
yield field_name
@classmethod
@property
def preferences_groups(self):
def preferences_groups(cls):
return None
@property
......
......@@ -7,7 +7,7 @@ readme = open('README.rst').read()
setup(
name='django-basetheme-bootstrap',
version='0.2.28',
version='0.2.29',
description='Django Basetheme Bootstrap',
long_description=readme,
author='Bryan Brancotte',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment