news transfer fix
This commit is contained in:
parent
45f09094f8
commit
1794de6d15
|
|
@ -90,13 +90,13 @@ class NewsSerializer(serializers.Serializer):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_state(data):
|
def get_state(data):
|
||||||
states = {
|
states = {
|
||||||
'new': News.WAITING,
|
'new': News.UNPUBLISHED,
|
||||||
'published': News.PUBLISHED,
|
'published': News.PUBLISHED,
|
||||||
'hidden': News.HIDDEN,
|
'hidden': News.HIDDEN,
|
||||||
'published_exclusive': News.PUBLISHED_EXCLUSIVE,
|
'published_exclusive': News.PUBLISHED,
|
||||||
'scheduled_exclusively': News.WAITING,
|
'scheduled_exclusively': News.PUBLISHED,
|
||||||
}
|
}
|
||||||
return states.get(data['page__state'], News.WAITING)
|
return states.get(data['page__state'], News.UNPUBLISHED)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_template(data):
|
def get_template(data):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user