##// END OF EJS Templates
events: Implement the as_dict method for repository group events.
Martin Bornhold -
r565:70789fb7 default
parent child Browse files
Show More
@@ -21,6 +21,7 b' import logging'
21 from rhodecode.translation import lazy_ugettext
21 from rhodecode.translation import lazy_ugettext
22 from rhodecode.events.base import RhodecodeEvent
22 from rhodecode.events.base import RhodecodeEvent
23
23
24
24 log = logging.getLogger()
25 log = logging.getLogger()
25
26
26
27
@@ -35,19 +36,21 b' class RepoGroupEvent(RhodecodeEvent):'
35 super(RepoGroupEvent, self).__init__()
36 super(RepoGroupEvent, self).__init__()
36 self.repo_group = repo_group
37 self.repo_group = repo_group
37
38
38 # TODO: Implement this
39 def as_dict(self):
39 # def as_dict(self):
40 data = super(RepoGroupEvent, self).as_dict()
40 # from rhodecode.model.repo import RepoModel
41 data.update({
41 # data = super(RepoGroupEvent, self).as_dict()
42 'repo_group': {
42 # data.update({
43 'group_id': self.repo_group.group_id,
43 # 'repo': {
44 'group_name': self.repo_group.group_name,
44 # 'repo_id': self.repo.repo_id,
45 'group_parent_id': self.repo_group.group_parent_id,
45 # 'repo_name': self.repo.repo_name,
46 'group_description': self.repo_group.group_description,
46 # 'repo_type': self.repo.repo_type,
47 'user_id': self.repo_group.user_id,
47 # 'url': RepoModel().get_url(self.repo)
48 'created_by': self.repo_group.user.username,
48 # }
49 'created_on': self.repo_group.created_on,
49 # })
50 'enable_locking': self.repo_group.enable_locking,
50 # return data
51 }
52 })
53 return data
51
54
52
55
53 class RepoGroupCreateEvent(RepoGroupEvent):
56 class RepoGroupCreateEvent(RepoGroupEvent):
General Comments 0
You need to be logged in to leave comments. Login now