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

Release v2.5.2 #6570

Merged
merged 50 commits into from
Jul 27, 2023
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
4b179be
Updated CHANGELOG.md, bump version (#6426)
azhavoro Jul 5, 2023
c31fbeb
Code coverage fixes (#6420)
yasakova-anastasia Jul 10, 2023
44382be
Fix overly broad exception conversion in `LambdaFunction.invoke` (#6394)
SpecLad Jul 10, 2023
c15a855
Bump tough-cookie from 4.1.2 to 4.1.3 (#6445)
dependabot[bot] Jul 11, 2023
a63f0f1
Bump stylelint from 13.13.1 to 15.10.1 (#6444)
dependabot[bot] Jul 11, 2023
1e18713
Allow attribute default/permitted values to be blank (#6454)
SpecLad Jul 12, 2023
03975ea
Supported multi-line input, fixed issue in aam with losing selection …
bsekachev Jul 12, 2023
31b5e25
Keep model input data unchanged in SDK (#6455)
zhiltsov-max Jul 12, 2023
0c8a46e
Honey Pot fixes (#6456)
zhiltsov-max Jul 12, 2023
573d57c
Bump semver from 6.3.0 to 6.3.1 in /tests (#6452)
dependabot[bot] Jul 13, 2023
0715ec0
Bump semver from 5.7.1 to 5.7.2 (#6453)
dependabot[bot] Jul 13, 2023
99a6cf9
Bump Hadolint version (#6478)
SpecLad Jul 14, 2023
1531f86
Update codeowners (#6489)
Jul 17, 2023
bf3e31d
Add error message (#6500)
Jul 18, 2023
60b925a
Fixed: 3d job can not be opened in validation mode (#6507)
bsekachev Jul 18, 2023
9fc6b00
No helm tests on edit (#6495)
Jul 18, 2023
bc5036f
Create cvat_sdk.datasets, a framework-agnostic version of cvat_sdk.py…
SpecLad Jul 18, 2023
783c414
Close av contaner after use (#6501)
azhavoro Jul 19, 2023
19fefc5
Fixed calculating statistics in case with removed frames (#6493)
bsekachev Jul 19, 2023
8de7722
Fixed using initial frame from query parameter (#6506)
bsekachev Jul 19, 2023
f861aef
Fixed default value for an attribute (RAW editor), refactored labels …
bsekachev Jul 19, 2023
1ef561a
Fixed SAM plugin (403 code for workers in organizations) (#6514)
bsekachev Jul 19, 2023
c230395
Fix job minutes in dates (#6519)
zhiltsov-max Jul 20, 2023
54d2ef3
Update develop (release 2.5.1) (#6521)
azhavoro Jul 20, 2023
98adeb8
Bump word-wrap from 1.2.3 to 1.2.4 (#6518)
dependabot[bot] Jul 20, 2023
e379444
Fix validation in `AttributeSerializer` (#6447)
SpecLad Jul 20, 2023
123a86c
Fixed hash for shapes, tags and skeletons (#6517)
bsekachev Jul 20, 2023
791604a
Minor CI improvements (#6527)
azhavoro Jul 20, 2023
1da005c
Added default value test, refactored tests (#6529)
bsekachev Jul 20, 2023
fea0dae
Adjusted plugin registration way (#6533)
bsekachev Jul 21, 2023
ded24ad
Added e2e test to check export hash (#6532)
bsekachev Jul 21, 2023
be81d28
automatic annotation documentation updated (#6409)
mdacoca Jul 21, 2023
9659f82
Extend cleaning for downloaded file names (#6492)
zhiltsov-max Jul 21, 2023
1bc7767
generate_image_file: don't hardcode the file format (#6538)
SpecLad Jul 23, 2023
2896bec
Accelerated React rendering of objects list for tracks (#6544)
bsekachev Jul 24, 2023
6e5ac4b
Fix keyframe removing (#6494)
Jul 24, 2023
d72e954
Fix BrowsableAPIRenderer for server viewset (#6553)
azhavoro Jul 24, 2023
a79052f
Project/Task/Job Analytics (#6371)
klakhov Jul 25, 2023
2bb87cf
multiple fixes to make helm work (#6137)
Keramblock Jul 25, 2023
5a69e67
Fixed cards on project page, updated stylelint & css loader packages …
bsekachev Jul 25, 2023
3e84570
Stop creating linter report files in CI (#6560)
SpecLad Jul 27, 2023
442641f
honeypots documentation updated (#6559)
mdacoca Jul 27, 2023
162f1c7
release notes update
mdacoca Jul 27, 2023
7195f51
line length change
mdacoca Jul 27, 2023
8ee3111
Update CHANGELOG.md
azhavoro Jul 27, 2023
6f07d30
Update CHANGELOG.md
azhavoro Jul 27, 2023
b49afd1
Merge pull request #6569 from opencv/ma/release-notes
azhavoro Jul 27, 2023
d976460
Bump version to 2.5.2
azhavoro Jul 27, 2023
9808140
Merge remote-tracking branch 'origin/master' into release-2.5.2
azhavoro Jul 27, 2023
9ce45be
Get rid of resize observer
bsekachev Jul 27, 2023
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
Prev Previous commit
Next Next commit
Fix validation in AttributeSerializer (#6447)
The current implementation of `to_internal_value` doesn't call the base
class method, which is supposed to carry out generic validation of
serializer fields. This means that we essentially don't validate
attribute fields beyond what is done incidentally by database
contraints.

Fix it by removing the overridden method entirely, and adding a special
field class for the `values` field.
  • Loading branch information
SpecLad authored Jul 20, 2023

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
commit e379444a8758bdcf7fc7083ced103ba56b9348cb
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -32,6 +32,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed SAM plugin (403 code for workers in organizations) (<https://github.com/opencv/cvat/pull/6514>)
- Using initial frame from query parameter to open specific frame in a job
(<https://github.com/opencv/cvat/pull/6506>)
- Server-side validation for attribute specifications
(<https://github.com/opencv/cvat/pull/6447>)

### Security
- TDB
9 changes: 6 additions & 3 deletions cvat/apps/dataset_manager/tests/test_formats.py
Original file line number Diff line number Diff line change
@@ -259,7 +259,8 @@ def _generate_task(self, images, **overrides):
"name": "parked",
"mutable": True,
"input_type": "checkbox",
"default_value": False
"default_value": "false",
"values": [],
},
]
},
@@ -561,7 +562,8 @@ def _generate_task(self, images):
"name": "parked",
"mutable": True,
"input_type": "checkbox",
"default_value": False
"default_value": "false",
"values": [],
},
]
},
@@ -723,7 +725,8 @@ def _generate_task(self, images, annotation_format, **overrides):
"name": "parked",
"mutable": True,
"input_type": "checkbox",
"default_value": False
"default_value": "false",
"values": [],
}
]
},
24 changes: 8 additions & 16 deletions cvat/apps/engine/serializers.py
Original file line number Diff line number Diff line change
@@ -212,30 +212,22 @@ class Meta:
'last_login': { 'allow_null': True }
}

class DelimitedStringListField(serializers.ListField):
def to_representation(self, value):
return super().to_representation(value.split('\n'))

def to_internal_value(self, data):
return '\n'.join(super().to_internal_value(data))

class AttributeSerializer(serializers.ModelSerializer):
values = serializers.ListField(allow_empty=True,
values = DelimitedStringListField(allow_empty=True,
child=serializers.CharField(allow_blank=True, max_length=200),
)

class Meta:
model = models.AttributeSpec
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', []))
return attribute

def to_representation(self, instance):
if instance:
rep = super().to_representation(instance)
rep['values'] = instance.values.split('\n')
else:
rep = instance

return rep

class SublabelSerializer(serializers.ModelSerializer):
id = serializers.IntegerField(required=False)
attributes = AttributeSerializer(many=True, source='attributespec_set', default=[],
15 changes: 10 additions & 5 deletions cvat/apps/engine/tests/test_rest_api.py
Original file line number Diff line number Diff line change
@@ -1811,7 +1811,8 @@ def _create_project(project_data):
"name": "bool_attribute",
"mutable": True,
"input_type": AttributeType.CHECKBOX,
"default_value": "true"
"default_value": "true",
"values": [],
}],
}, {
"name": "person",
@@ -2572,7 +2573,8 @@ def test_api_v2_tasks_admin(self):
"name": "my_attribute",
"mutable": True,
"input_type": AttributeType.CHECKBOX,
"default_value": "true"
"default_value": "true",
"values": [],
}]
}]
}
@@ -2895,7 +2897,8 @@ def _create_task(task_data, media_data):
"name": "bool_attribute",
"mutable": True,
"input_type": AttributeType.CHECKBOX,
"default_value": "true"
"default_value": "true",
"values": [],
}],
}, {
"name": "person",
@@ -2915,7 +2918,8 @@ def _create_task(task_data, media_data):
"name": "bool_attribute",
"mutable": True,
"input_type": AttributeType.CHECKBOX,
"default_value": "true"
"default_value": "true",
"values": [],
}],
}, {
"name": "person",
@@ -4649,7 +4653,8 @@ def _create_task(self, owner, assignee, annotation_format=""):
"name": "parked",
"mutable": True,
"input_type": "checkbox",
"default_value": "false"
"default_value": "false",
"values": [],
},
]
},
6 changes: 4 additions & 2 deletions cvat/apps/lambda_manager/tests/assets/tasks.json
Original file line number Diff line number Diff line change
@@ -18,7 +18,8 @@
"name": "parked",
"mutable": true,
"input_type": "checkbox",
"default_value": false
"default_value": "false",
"values": []
}
]
},
@@ -47,7 +48,8 @@
"name": "parked",
"mutable": true,
"input_type": "checkbox",
"default_value": false
"default_value": "false",
"values": []
}
]
},