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

Using python's "in" syntax with udf dictionaries #17

Closed
alneberg opened this issue Aug 2, 2013 · 0 comments
Closed

Using python's "in" syntax with udf dictionaries #17

alneberg opened this issue Aug 2, 2013 · 0 comments

Comments

@alneberg
Copy link
Member

alneberg commented Aug 2, 2013

I tried using python's "in" syntax, i.e.

print 'Amount (ng)' in artifact.udf

This should return True or False, but results in the following error:

KeyError                                  Traceback (most recent call last)
<ipython-input-52-488d06a8dc5e> in <module>()
----> 1 print 'Amount (ng)' in artifact.udf

/Users/johannesalneberg/.virtualenvs/genologics-lims/lib/python2.7/site-packages/genologics-0.2.3-py2.7.egg/genologics/entities.pyc in __getitem__(self, key)
    222
    223     def __getitem__(self, key):
--> 224         return self._lookup[key]
    225
    226     def __setitem__(self, key, value):

KeyError: 0

I don't know how the 0 ends up there.. This would be a nice feature to have, especially since the LIMS seems to erase the entire field from an artifact if the user erases the value of it... Might be something to contact Genologics about as well?

@b97pla b97pla closed this as completed in 6ed4d01 Sep 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant