Browse Source

Moved the validate_query_filters method from LeQuery to LeFilteredQuery

Roland Haroutiounian 9 years ago
parent
commit
efe35331fe
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      lodel/leapi/query.py

+ 7
- 7
lodel/leapi/query.py View File

@@ -20,13 +20,6 @@ class LeQuery(object):
20 20
             raise TypeError("target class has to be a child class of LeObject")
21 21
         self._target_class = target_class
22 22
 
23
-    @classmethod
24
-    def validate_query_filters(cls, query_filters):
25
-        for query_filter in query_filters:
26
-            if query_filter[1] not in cls._query_operators:
27
-                raise LeQueryError("The operator %s is not valid." % query_filter[1])
28
-        return True
29
-
30 23
 
31 24
 class LeInsertQuery(LeQuery):
32 25
     action = 'insert'
@@ -56,6 +49,13 @@ class LeFilteredQuery(LeQuery):
56 49
     def __init__(self, target_class):
57 50
         super().__init__(target_class)
58 51
 
52
+    @classmethod
53
+    def validate_query_filters(cls, query_filters):
54
+        for query_filter in query_filters:
55
+            if query_filter[1] not in cls._query_operators:
56
+                raise LeQueryError("The operator %s is not valid." % query_filter[1])
57
+        return True
58
+
59 59
 
60 60
 class LeGetQuery(LeFilteredQuery):
61 61
 

Loading…
Cancel
Save