File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1304,15 +1304,16 @@ class CreateOverwriteReviewSerializer(CreateReviewSerializer):
13041304 def validate (self , data ):
13051305 data = super ().validate (data )
13061306
1307- data ['revise' ] = True
1308- data ['status' ] = ExpertReportAnnotation .STATUS_HIDDEN if not data .pop ('is_safe' ) else ExpertReportAnnotation .STATUS_PUBLIC
1309- data ['simplified_annotation' ] = False
1310- data ['edited_user_notes' ] = data .pop ('public_note' , None ) or ""
13111307 # Case Not an insect will be empty taxon. In case of update we need to for it to None
13121308 data ['taxon' ] = data .pop ('taxon' , None )
13131309 data ['validation_value' ] = data .pop ('validation_value' , None )
13141310 data ['confidence' ] = data .pop ('confidence' , 0 )
13151311
1312+ data ['revise' ] = True
1313+ data ['status' ] = ExpertReportAnnotation .STATUS_HIDDEN if not data .pop ('is_safe' ) or data ['taxon' ] is None else ExpertReportAnnotation .STATUS_PUBLIC
1314+ data ['simplified_annotation' ] = False
1315+ data ['edited_user_notes' ] = data .pop ('public_note' , None ) or ""
1316+
13161317 if public_photo_uuid := data .pop ('photo__uuid' , None ):
13171318 try :
13181319 data ['best_photo' ] = Photo .objects .get (report = data ['report' ], uuid = public_photo_uuid )
You can’t perform that action at this time.
0 commit comments