equal
deleted
inserted
replaced
49 if self.entity.type not in SOURCE_TYPES: |
49 if self.entity.type not in SOURCE_TYPES: |
50 msg = _('Unknown source type') |
50 msg = _('Unknown source type') |
51 raise validation_error(self.entity, {('type', 'subject'): msg}) |
51 raise validation_error(self.entity, {('type', 'subject'): msg}) |
52 |
52 |
53 source = self.get_source(self.entity) |
53 source = self.get_source(self.entity) |
|
54 source.check_urls(self.entity) |
54 source.check_config(self.entity) |
55 source.check_config(self.entity) |
55 |
56 |
56 |
57 |
57 class SourceRemovedHook(SourceHook): |
58 class SourceRemovedHook(SourceHook): |
58 __regid__ = 'cw.sources.removed' |
59 __regid__ = 'cw.sources.removed' |
74 if oldname == 'system': |
75 if oldname == 'system': |
75 msg = _("You cannot rename the system source") |
76 msg = _("You cannot rename the system source") |
76 raise validation_error(self.entity, {('name', 'subject'): msg}) |
77 raise validation_error(self.entity, {('name', 'subject'): msg}) |
77 |
78 |
78 source = self.get_source(self.entity) |
79 source = self.get_source(self.entity) |
|
80 if 'url' in self.entity.cw_edited: |
|
81 source.check_urls(self.entity) |
79 if 'config' in self.entity.cw_edited: |
82 if 'config' in self.entity.cw_edited: |
80 source.check_config(self.entity) |
83 source.check_config(self.entity) |