mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Implement getting objects by a query criteria
This commit is contained in:
parent
7623ac6d0a
commit
5db726bdf4
@ -276,7 +276,8 @@ class CsvDB(object):
|
||||
for t_attr, t_data in zip(header, data):
|
||||
t_attr, t_type = t_attr.split(':')
|
||||
setattr(_obj, t_attr, self._to_type(t_data, t_type))
|
||||
objects.append(_obj)
|
||||
if self.__criteria(_obj, matches=matches, mt=mt, lt=lt, eq=eq):
|
||||
objects.append(_obj)
|
||||
return objects
|
||||
|
||||
def _to_type(self, data, type):
|
||||
|
Loading…
Reference in New Issue
Block a user