Different fixes for Release 0.5.0 (#667)

main
Boris Sekachev 7 years ago committed by Nikita Manovich
parent fbae6bbdcb
commit 0c33055311

@ -43,5 +43,11 @@
// This rule actual for user input data on the node.js environment mainly.
"security/detect-object-injection": 0,
"indent": ["warn", 4],
// recently added to airbnb
"max-classes-per-file": [0],
// it was opposite before and our code has been written according to previous rule
"arrow-parens": [0],
// object spread is a modern ECMA standard. Let's do not use it without babel
"prefer-object-spread": [0],
},
};

@ -1307,22 +1307,22 @@
z_order: Boolean(this.zOrder),
};
if (this.bugTracker) {
if (typeof (this.bugTracker) !== 'undefined') {
taskData.bug_tracker = this.bugTracker;
}
if (this.segmentSize) {
if (typeof (this.segmentSize) !== 'undefined') {
taskData.segment_size = this.segmentSize;
}
if (this.overlap) {
if (typeof (this.overlap) !== 'undefined') {
taskData.overlap = this.overlap;
}
if (this.startFrame) {
if (typeof (this.startFrame) !== 'undefined') {
taskData.start_frame = this.startFrame;
}
if (this.stopFrame) {
if (typeof (this.stopFrame) !== 'undefined') {
taskData.stop_frame = this.stopFrame;
}
if (this.frameFilter) {
if (typeof (this.frameFilter) !== 'undefined') {
taskData.frame_filter = this.frameFilter;
}

@ -240,9 +240,16 @@ class DashboardView {
let tasks = null;
try {
tasks = await window.cvat.tasks.get(Object.assign({}, {
const id = (new URLSearchParams(window.location.search)).get('id');
const filters = Object.assign({}, {
page,
}, this._params));
}, this._params);
if (id !== null) {
filters.id = +id;
}
tasks = await window.cvat.tasks.get(filters);
} catch (exception) {
let { message } = exception;
if (exception instanceof window.cvat.exceptions.ServerError) {
@ -316,6 +323,8 @@ class DashboardView {
this._params.search = search;
}
window.history.replaceState(null, null,
`${window.location.origin}${window.location.pathname}`);
dashboardPagination.twbsPagination('show', 1);
});

@ -650,7 +650,9 @@ class TaskAnnotation:
def __init__(self, pk, user):
self.user = user
self.db_task = models.Task.objects.prefetch_related("image_set").get(id=pk)
self.db_jobs = models.Job.objects.select_related("segment").filter(segment__task_id=pk)
# Postgres doesn't guarantee an order by default without explicit order_by
self.db_jobs = models.Job.objects.select_related("segment").filter(segment__task_id=pk).order_by('id')
self.ir_data = AnnotationIR()
def reset(self):

@ -0,0 +1,18 @@
# Generated by Django 2.2.4 on 2019-08-26 15:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('engine', '0020_remove_task_flipped'),
]
operations = [
migrations.AlterField(
model_name='task',
name='frame_filter',
field=models.CharField(blank=True, default='', max_length=256),
),
]

@ -51,7 +51,7 @@ class Task(models.Model):
image_quality = models.PositiveSmallIntegerField(default=50)
start_frame = models.PositiveIntegerField(default=0)
stop_frame = models.PositiveIntegerField(default=0)
frame_filter = models.CharField(max_length=256, default="")
frame_filter = models.CharField(max_length=256, default="", blank=True)
status = models.CharField(max_length=32, choices=StatusChoice.choices(),
default=StatusChoice.ANNOTATION)

File diff suppressed because one or more lines are too long

@ -48,6 +48,10 @@ def execute_python_code(source_code, global_vars=None, local_vars=None):
details = err.args[0]
line_number = err.lineno
raise InterpreterError("{} at line {}: {}".format(error_class, line_number, details))
except AssertionError as err:
# AssertionError doesn't contain any args and line number
error_class = err.__class__.__name__
raise InterpreterError("{}".format(error_class))
except Exception as err:
error_class = err.__class__.__name__
details = err.args[0]

Loading…
Cancel
Save