Commit b7ec322a authored by Matic Perovšek's avatar Matic Perovšek

fix [mapper fix when the target table has exactly two attributes and no...

fix [mapper fix when the target table has exactly two attributes and no features are produced; isprogramirano] bolje isprogramirano
parent 835a1ba9
...@@ -117,7 +117,9 @@ class RSD_Converter(ILP_Converter): ...@@ -117,7 +117,9 @@ class RSD_Converter(ILP_Converter):
''' '''
Converts the database context to RSD inputs. Converts the database context to RSD inputs.
''' '''
def all_examples(self, target=self.db.target_table): def all_examples(self, target=None):
if not target:
target = self.db.target_table
examples = self.db.rows(target, [self.db.target_att, self.db.pkeys[target]]) examples = self.db.rows(target, [self.db.target_att, self.db.pkeys[target]])
return '\n'.join(["%s('%s', %s)." % (target, cls, pk) for cls, pk in examples]) return '\n'.join(["%s('%s', %s)." % (target, cls, pk) for cls, pk in examples])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment