def put(self, request, schema, sequence): if schema not in PLAYGROUNDS and schema not in UNVERSIONED_SCHEMAS: raise PermissionDenied if schema.startswith("_"): raise PermissionDenied if request.user.is_anonymous: raise PermissionDenied if actions.has_sequence(dict(schema=schema, sequence_name=sequence), {}): raise APIError("Sequence already exists") return self.__create_sequence(request, schema, sequence, request.data)
def put(self, request, schema, sequence): if schema not in ['model_draft', 'sandbox', 'test']: raise PermissionDenied if schema.startswith('_'): raise PermissionDenied if request.user.is_anonymous(): raise PermissionDenied if actions.has_sequence(dict(schema=schema, sequence_name=sequence), {}): raise APIError('Sequence already exists') return self.__create_sequence(request, schema, sequence, request.data)