Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issues #412

Merged
merged 1 commit into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cvat/apps/engine/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Meta:
fields = ('id', 'name', 'mutable', 'input_type', 'default_value',
'values')

# pylint: disable=no-self-use
def to_internal_value(self, data):
attribute = data.copy()
attribute['values'] = '\n'.join(data.get('values', []))
Expand Down Expand Up @@ -67,9 +68,11 @@ class Meta:
model = models.ClientFile
fields = ('file', )

# pylint: disable=no-self-use
def to_internal_value(self, data):
return {'file': data}

# pylint: disable=no-self-use
def to_representation(self, instance):
upload_dir = instance.task.get_upload_dirname()
return instance.file.path[len(upload_dir) + 1:]
Expand Down Expand Up @@ -109,6 +112,7 @@ class Meta:
model = models.Task
fields = ('client_files', 'server_files', 'remote_files')

# pylint: disable=no-self-use
def update(self, instance, validated_data):
client_files = validated_data.pop('clientfile_set')
server_files = validated_data.pop('serverfile_set')
Expand Down
36 changes: 0 additions & 36 deletions cvat/apps/engine/static/engine/js/qunitTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

/* global
LabelsInfo:false
AnnotationParser:false
Listener:false
PlayerModel:false
*/
Expand Down Expand Up @@ -34,41 +33,6 @@ window.cvat = {
translate: {},
};

const framesMeta = [
{
width: 1920,
height: 1080,
},
{
width: 1600,
height: 859,
},
{
width: 3840,
height: 2160,
},
{
width: 2560,
height: 1920,
},
{
width: 1920,
height: 1080,
},
{
width: 1920,
height: 1080,
},
{
width: 700,
height: 453,
},
{
width: 1920,
height: 1200,
},
];

const taskData = {
url: 'http://localhost:7000/api/v1/tasks/3',
id: 3,
Expand Down
4 changes: 2 additions & 2 deletions cvat/apps/engine/static/engine/js/shapeCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,15 @@ class ShapeCollectionModel extends Listener {
Object.assign(shape, window.cvat.translate.points.clientToServer(shape));
}

for (let attr of shape.attributes) {
for (const attr of shape.attributes) {
attr.spec_id = attr.id;
delete attr.id;
}
}

const data = {
shapes: [],
tracks: []
tracks: [],
};

const mapping = [];
Expand Down