Browse Source

Implemented EmFieldGroup.fields()

Not tested because of bugs in EmField
Yann Weber 9 years ago
parent
commit
5e04b34a92
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      EditorialModel/fieldgroups.py

+ 7
- 1
EditorialModel/fieldgroups.py View File

@@ -62,4 +62,10 @@ class EmFieldGroup(EmComponent):
62 62
     # @return A list of EmField uid
63 63
     # @todo Implement this method
64 64
     def fields(self):
65
-        pass
65
+        field_table = sqlutils.getTable(EmField)
66
+        req = field_table.select(field_table.c.uid).where(field_table.c.fieldgroup_id == self.uid)
67
+        conn = self.__class__.getDbE().connect()
68
+        res = conn.execute(req)
69
+        rows = res.fetchall()
70
+        conn.close()
71
+        return [ row['uid'] for row in rows]

Loading…
Cancel
Save