Commit 763919d 1 parent 07088f0 commit 763919d Copy full SHA for 763919d
File tree 3 files changed +5
-27
lines changed
senaite/core/exportimport/setupdata
3 files changed +5
-27
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ Changelog
4
4
2.4.0 (unreleased)
5
5
------------------
6
6
7
+ - #2211 Remove `Profile ` field (stale) from AnalysisRequest
7
8
- #2207 Support for file upload on analysis (pre) conditions
8
9
- #2208 Remove `default_method ` from AnalysisRequest's Contact field
9
10
- #2204 Fix traceback when retracting an analysis with a detection limit
Original file line number Diff line number Diff line change 396
396
),
397
397
),
398
398
399
- # TODO Remove Profile field (in singular)
400
- ReferenceField (
401
- 'Profile' ,
402
- allowed_types = ('AnalysisProfile' ,),
403
- referenceClass = HoldingReference ,
404
- relationship = 'AnalysisRequestAnalysisProfile' ,
405
- mode = "rw" ,
406
- read_permission = View ,
407
- write_permission = ModifyPortalContent ,
408
- widget = ReferenceWidget (
409
- label = _ ("Analysis Profile" ),
410
- description = _ ("Analysis profiles apply a certain set of analyses" ),
411
- size = 20 ,
412
- render_own_label = True ,
413
- visible = False ,
414
- catalog_name = 'senaite_catalog_setup' ,
415
- base_query = {"is_active" : True ,
416
- "sort_on" : "sortable_title" ,
417
- "sort_order" : "ascending" },
418
- showOn = False ,
419
- ),
420
- ),
421
-
422
399
ReferenceField (
423
400
'Profiles' ,
424
401
multiValued = 1 ,
Original file line number Diff line number Diff line change @@ -2280,13 +2280,13 @@ def Import(self):
2280
2280
getFullname = row ['CCContact_Fullname' ])[0 ].getObject ()
2281
2281
obj .setCCContact (contact )
2282
2282
if row ['AnalysisProfile_title' ]:
2283
- profile = pc (portal_type = "AnalysisProfile" ,
2284
- title = row ['AnalysisProfile_title' ].getObject () )
2285
- obj .setProfile ( profile )
2283
+ profiles = pc (portal_type = "AnalysisProfile" ,
2284
+ title = row ['AnalysisProfile_title' ])[ 0 ] .getObject ()
2285
+ obj .setProfiles ([ profiles ] )
2286
2286
if row ['ARTemplate_title' ]:
2287
2287
template = pc (portal_type = "ARTemplate" ,
2288
2288
title = row ['ARTemplate_title' ])[0 ].getObject ()
2289
- obj .setProfile (template )
2289
+ obj .setTemplate (template )
2290
2290
2291
2291
obj .unmarkCreationFlag ()
2292
2292
You can’t perform that action at this time.
0 commit comments