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

NMRL-320 AttributeError while copying Service: 'float' object has no attribute 'split' #127

Merged
merged 1 commit into from
Jun 12, 2017
Merged
Changes from all commits
Commits
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
10 changes: 6 additions & 4 deletions bika/lims/controlpanel/bika_analysisservices.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ def copy_service(self, src_uid, dst_title, dst_keyword):
if field.getType() == "Products.Archetypes.Field.ComputedField" \
or fieldname in self.skip_fieldnames:
continue
getter = field.getAccessor(src_service)
setter = dst_service.Schema()[fieldname].getMutator(dst_service)
setter(getter())
value = field.get(src_service)
if value:
mutator_name = dst_service.getField(fieldname).mutator
mutator = getattr(dst_service, mutator_name)
mutator(value)
dst_service.reindexObject()
return dst_title
else:
Expand Down Expand Up @@ -300,7 +302,7 @@ def __init__(self, context, request):
sort_on="sortable_title")
self.an_cats_order = dict([(b.Title, "{:04}".format(a))
for a, b in enumerate(self.an_cats)])

def isItemAllowed(self, obj):
"""
It checks if the item can be added to the list depending on the
Expand Down