Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-0.3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Manovich committed Dec 28, 2018
2 parents 23b6b54 + ad76521 commit 1b9acfb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cvat/apps/engine/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,12 @@ def _parse_labels(labels):
raise ValueError("labels string is not corect. " +
"`{}` attribute has incorrect value.".format(attr['name']))
elif attr['type'] == 'number': # <prefix>number=name:min,max,step
if not (len(values) == 3 and values[0].isdigit() and \
values[1].isdigit() and values[2].isdigit() and \
int(values[0]) < int(values[1])):
raise ValueError("labels string is not corect. " +
try:
if len(values) != 3 or float(values[2]) <= 0 or \
float(values[0]) >= float(values[1]):
raise ValueError
except ValueError:
raise ValueError("labels string is not correct. " +
"`{}` attribute has incorrect format.".format(attr['name']))

if attr['name'] in parsed_labels[last_label]:
Expand Down
1 change: 1 addition & 0 deletions cvat/apps/engine/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def save_annotation_for_job(request, jid):
if 'logs' in data:
for event in json.loads(data['logs']):
clogger.job[jid].info(json.dumps(event))
slogger.job[jid].info("annotation have been saved for the {} job".format(jid))
except RequestException as e:
slogger.job[jid].error("cannot send annotation logs for job {}".format(jid), exc_info=True)
return HttpResponseBadRequest(str(e))
Expand Down

0 comments on commit 1b9acfb

Please sign in to comment.