Gitlab CSE Unil

Commit 802114b7 authored by Julien Furrer's avatar Julien Furrer
Browse files

Fixed compat drf 3.1

parent d72b4819
......@@ -58,6 +58,7 @@ class BaseAnObjSerializer(serializers.ModelSerializer):
class Meta:
model = AnObj
fields = ('id', 'uuid', 'name', 'owner', 'owner_name', 'annotations', 'sharing_mode', 'locked')
read_only_fields = ('members',)
def get_annotations(self, anobj):
request = self.context.get('request')
......@@ -99,7 +100,7 @@ class BaseAnObjSerializer(serializers.ModelSerializer):
class AnObjSerializer(BaseAnObjSerializer):
members = UserSerializer(many=True, required=False) # , allow_add_remove=True) # read_only=True)
members = UserSerializer(many=True, required=False, read_only=True)
class Meta:
model = AnObj
......
......@@ -149,7 +149,7 @@ function ($, paper, Signal, Config, view) {
url: Config.api.annotables+ (parseInt(aid, 10)) + "/",
type: "PATCH",
dataType: 'json',
data: {name: name},
data: {'name': name},
success: function(data) {
_events.annotableChanged.dispatch(data);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment