Remove mutual exclusivity between value/strvalue when searching for Attributes with manager

This commit is contained in:
Griatch 2018-03-01 22:21:22 +01:00
parent 29ab570d55
commit accd0f286e

View file

@ -65,8 +65,8 @@ class TypedObjectManager(idmapper.manager.SharedMemoryManager):
query.append(("attribute__db_category", category))
if strvalue:
query.append(("attribute__db_strvalue", strvalue))
elif value:
# strvalue and value are mutually exclusive
if value:
# no reason to make strvalue/value mutually exclusive at this level
query.append(("attribute__db_value", value))
return Attribute.objects.filter(
pk__in=self.model.db_attributes.through.objects.filter(