[Backport] Add owner to the read-only fields on issues, tasks, wiki pages and user stories

remotes/origin/issue/4795/notification_even_they_are_disabled
Jesús Espino 2016-03-01 16:16:17 +01:00 committed by David Barragán Merino
parent 4c8a515004
commit bcb8f4d0ed
4 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ class IssueSerializer(WatchersValidator, VoteResourceSerializerMixin, EditableWa
class Meta: class Meta:
model = models.Issue model = models.Issue
read_only_fields = ('id', 'ref', 'created_date', 'modified_date') read_only_fields = ('id', 'ref', 'created_date', 'modified_date', 'owner')
def get_comment(self, obj): def get_comment(self, obj):
# NOTE: This method and field is necessary to historical comments work # NOTE: This method and field is necessary to historical comments work

View File

@ -50,7 +50,7 @@ class TaskSerializer(WatchersValidator, VoteResourceSerializerMixin, EditableWat
class Meta: class Meta:
model = models.Task model = models.Task
read_only_fields = ('id', 'ref', 'created_date', 'modified_date') read_only_fields = ('id', 'ref', 'created_date', 'modified_date', 'owner')
def get_comment(self, obj): def get_comment(self, obj):
return "" return ""

View File

@ -67,7 +67,7 @@ class UserStorySerializer(WatchersValidator, VoteResourceSerializerMixin, Editab
class Meta: class Meta:
model = models.UserStory model = models.UserStory
depth = 0 depth = 0
read_only_fields = ('created_date', 'modified_date') read_only_fields = ('created_date', 'modified_date', 'owner')
def get_total_points(self, obj): def get_total_points(self, obj):
return obj.get_total_points() return obj.get_total_points()

View File

@ -30,7 +30,7 @@ class WikiPageSerializer(WatchersValidator, WatchedResourceModelSerializer, seri
class Meta: class Meta:
model = models.WikiPage model = models.WikiPage
read_only_fields = ('modified_date', 'created_date') read_only_fields = ('modified_date', 'created_date', 'owner')
def get_html(self, obj): def get_html(self, obj):
return mdrender(obj.project, obj.content) return mdrender(obj.project, obj.content)