Remove mutual exclusivity between value/strvalue when searching for Attributes with manager
This commit is contained in:
parent
047e9f619a
commit
71b6e6cdea
1 changed files with 2 additions and 2 deletions
|
|
@ -65,8 +65,8 @@ class TypedObjectManager(idmapper.manager.SharedMemoryManager):
|
||||||
query.append(("attribute__db_category", category))
|
query.append(("attribute__db_category", category))
|
||||||
if strvalue:
|
if strvalue:
|
||||||
query.append(("attribute__db_strvalue", strvalue))
|
query.append(("attribute__db_strvalue", strvalue))
|
||||||
elif value:
|
if value:
|
||||||
# strvalue and value are mutually exclusive
|
# no reason to make strvalue/value mutually exclusive at this level
|
||||||
query.append(("attribute__db_value", value))
|
query.append(("attribute__db_value", value))
|
||||||
return Attribute.objects.filter(
|
return Attribute.objects.filter(
|
||||||
pk__in=self.model.db_attributes.through.objects.filter(
|
pk__in=self.model.db_attributes.through.objects.filter(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue