Browse Source

Correction d_hash

prieto 8 years ago
parent
commit
d2a570ca45
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      lodel/editorial_model/components.py

+ 7
- 1
lodel/editorial_model/components.py View File

132
 
132
 
133
     def d_hash(self):
133
     def d_hash(self):
134
         m = hashlib.md5()
134
         m = hashlib.md5()
135
-        payload = str(super().d_hash()) + ("1" if self.abstract else "0")
135
+        payload = str(super().d_hash())  + ("1" if self.abstract else "0") 
136
+
136
         for p in sorted(self.parents):
137
         for p in sorted(self.parents):
137
             payload += str(p.d_hash())
138
             payload += str(p.d_hash())
138
         for fuid in sorted(self.__fields.keys()):
139
         for fuid in sorted(self.__fields.keys()):
186
     def get_data_handler_cls(self):
187
     def get_data_handler_cls(self):
187
         return copy.copy(selfdata_handler_cls)
188
         return copy.copy(selfdata_handler_cls)
188
     
189
     
190
+    ##@brief Returne the uid of the emclass which contains this field
191
+    def get_emclass_uid(self):
192
+        return self._emclass.uid
193
+    
189
     # @warning Not complete !
194
     # @warning Not complete !
190
     # @todo Complete the hash when data handlers becomes available
195
     # @todo Complete the hash when data handlers becomes available
191
     def d_hash(self):
196
     def d_hash(self):
305
         
310
         
306
     ##@brief Add a applicant
311
     ##@brief Add a applicant
307
     # @param em_group EmGroup|iterable : an EmGroup instance or list of instance
312
     # @param em_group EmGroup|iterable : an EmGroup instance or list of instance
313
+    # Useless ???
308
     def add_applicant(self, grp):
314
     def add_applicant(self, grp):
309
         try:
315
         try:
310
             for group in grp:
316
             for group in grp:

Loading…
Cancel
Save