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,6 +276,7 @@ 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))
|
||||
if self.__criteria(_obj, matches=matches, mt=mt, lt=lt, eq=eq):
|
||||
objects.append(_obj)
|
||||
return objects
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user