Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanovic committed Jan 31, 2019
1 parent 6902545 commit 205186d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cvat/apps/dashboard/static/dashboard/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ function setupTaskCreator() {
let taskData = new FormData();
taskData.append("name", name);
taskData.append("bug_tracker", bugTrackerLink);
taskData.append("labels", labels);
let labesInfo = new LabelsInfo(labels);
taskData.append("labels[0]", labels);
taskData.append("flipped", flipImages);
taskData.append("z_order", zOrder);

Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Task(models.Model):
segment_size = models.PositiveIntegerField()
z_order = models.BooleanField(default=False)
flipped = models.BooleanField(default=False)
image_quality = models.PositiveSmallIntegerField(default=50)
image_quality = models.PositiveSmallIntegerField()
# FIXME: remote source field
source = SafeCharField(max_length=256, default="unknown")
status = models.CharField(max_length=32, choices=StatusChoice.choices(),
Expand Down
9 changes: 5 additions & 4 deletions cvat/apps/engine/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ class TaskSerializer(serializers.ModelSerializer):
labels = LabelSerializer(many=True, source='label_set', partial=True)
segments = SegmentSerializer(many=True, source='segment_set', read_only=True)
client_files = ClientFileSerializer(many=True, source='clientfile_set',
write_only=True, partial=True)
write_only=True, default=[])
server_files = ServerFileSerializer(many=True, source='serverfile_set',
write_only=True, partial=True)
write_only=True, default=[])
remote_files = RemoteFileSerializer(many=True, source='remotefile_set',
write_only=True, partial=True)
image_quality = serializers.IntegerField(min_value=0, max_value=100)
write_only=True, default=[])
image_quality = serializers.IntegerField(min_value=0, max_value=100,
default=50)

class Meta:
model = Task
Expand Down

0 comments on commit 205186d

Please sign in to comment.