40 """ |
40 """ |
41 |
41 |
42 super(Logic, self).__init__(model=model, base_model=base_model, |
42 super(Logic, self).__init__(model=model, base_model=base_model, |
43 scope_logic=scope_logic) |
43 scope_logic=scope_logic) |
44 |
44 |
|
45 def getKeyValues(self, entity): |
|
46 """See base.Logic.getKeyNameValues. |
|
47 """ |
|
48 |
|
49 return [entity.prefix, entity.scope_path, entity.link_id] |
|
50 |
|
51 def getKeyValuesFromFields(self, fields): |
|
52 """See base.Logic.getKeyValuesFromFields. |
|
53 """ |
|
54 |
|
55 return [fields['prefix'], fields['scope_path'], fields['link_id']] |
|
56 |
|
57 def getKeyFieldNames(self): |
|
58 """See base.Logic.getKeyFieldNames. |
|
59 """ |
|
60 |
|
61 return ['prefix', 'scope_path', 'link_id'] |
|
62 |
45 def _updateField(self, entity, name, value): |
63 def _updateField(self, entity, name, value): |
46 """Special logic for role. If state changes to active we flush the sidebar. |
64 """Special logic for role. If state changes to active we flush the sidebar. |
47 """ |
65 """ |
48 |
66 |
49 if (name == 'is_featured') and (entity.is_featured != value): |
67 if (name == 'is_featured') and (entity.is_featured != value): |