X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=engine%2Fmanifoldquery.py;h=ce9f3ea4847ee8cdd6d1e41bcd643e1485409c54;hb=171b1ca63f0b8ad399fbb063a018513b8e4ea03b;hp=e48c94d65b71849e9ca291eb87da2681001fa4e6;hpb=00e925de365deefe83fd1bf17726dce43947dfbd;p=unfold.git diff --git a/engine/manifoldquery.py b/engine/manifoldquery.py index e48c94d6..ce9f3ea4 100644 --- a/engine/manifoldquery.py +++ b/engine/manifoldquery.py @@ -53,7 +53,14 @@ class ManifoldQuery: # to see an example just look at the server's output # incoming POST def fill_from_dict (self, d): - # mandatory... - self.action=d['action'] - self.method=d['method'] - # + print d + for key in d.keys(): + for arg in ['action', 'method', 'filters', 'fields', 'timestamp', 'params']: + if arg in key: + # dirty hack around fields; fields must be a list + if arg == 'fields': + setattr(self, arg, [d[key]]) + else: + setattr(self, arg, d[key]) + break +