web/views/editcontroller.py
branchstable
changeset 3689 deb13e88e037
parent 3631 6176ef2f6488
child 3720 5376aaadd16b
child 3921 4f24b6ef3da9
--- a/web/views/editcontroller.py	Thu Oct 15 18:43:04 2009 +0200
+++ b/web/views/editcontroller.py	Thu Oct 15 20:29:21 2009 +0200
@@ -95,7 +95,7 @@
         # needs some information provided by those inlined relation. Moreover
         # this will generate less write queries.
         for rschema in entity.e_schema.subject_relations():
-            if rschema.is_final():
+            if rschema.final:
                 self.handle_attribute(entity, rschema, formparams)
             elif rschema.inlined:
                 self.handle_inlined_relation(rschema, formparams, entity)
@@ -129,11 +129,11 @@
             formparams[var] = eid
             execute(rql, formparams)
         for rschema in entity.e_schema.subject_relations():
-            if rschema.is_final() or rschema.inlined:
+            if rschema.final or rschema.inlined:
                 continue
             self.handle_relation(rschema, formparams, 'subject', entity)
         for rschema in entity.e_schema.object_relations():
-            if rschema.is_final():
+            if rschema.final:
                 continue
             self.handle_relation(rschema, formparams, 'object', entity)
         if edited:
@@ -228,7 +228,7 @@
                     #    self.relations.append('X %s_format %%(%s)s'
                     #                          % (attr, key))
                     # XXX suppose a File compatible schema
-                    if entity.e_schema.has_subject_relation('name') \
+                    if 'name' in entity.e_schema.subjrels \
                            and not formparams.get('name'):
                         formparams['name'] = value[0]
                         self.relations.append('X name %(name)s')