Need to use unique function name

This commit is contained in:
mvdbeek
2019-04-17 17:11:18 +02:00
parent 885d9d1766
commit 2b95d6911d
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ class TaggableDeserializerMixin(object):
class TaggableFilterMixin(object):
def create_expression(self, attr, op, val):
def create_tag_filter(self, attr, op, val):
target_model = getattr(model, "%sTagAssociation" % self.model_class.__name__)
id_column = "%s_id" % target_model.table.name.rsplit('_tag_association')[0]
if ':' not in val and op == 'eq':
@@ -119,5 +119,5 @@ class TaggableFilterMixin(object):
def _add_parsers(self):
self.orm_filter_parsers.update({
'tag': self.create_expression
'tag': self.create_tag_filter
})
+2 -2
View File
@@ -95,7 +95,7 @@ class DynamicToolManager(ModelManager):
class ToolFilterMixin(object):
def create_expression(self, attr, op, val):
def create_tool_filter(self, attr, op, val):
if op == 'eq':
cond = model.Job.table.c.tool_id == val
elif op == 'contains':
@@ -110,5 +110,5 @@ class ToolFilterMixin(object):
def _add_parsers(self):
self.orm_filter_parsers.update({
'tool_id': self.create_expression,
'tool_id': self.create_tool_filter,
})