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

Sample creation #193

Open
robinandeer opened this issue Feb 16, 2017 · 1 comment
Open

Sample creation #193

robinandeer opened this issue Feb 16, 2017 · 1 comment

Comments

@robinandeer
Copy link

When creating a new sample, how can you pass initial UDFs?

We have set up LIMS to require some UDFs on sample level so I can't create the sample before setting the correct UDFs.

I tried to look into setting up a UdfDictionary but it requires an instance of the Sample which is what I'm trying to create 😅

@tcezard
Copy link

tcezard commented Feb 16, 2017

ideally you would want to create it like this:

Sample.create(l, container=c, position='H:3', project=p, name='sampletest', udf={'testudf':'testudf_value'})

However UdfDictionaryDescriptor does not have a __set__ method so it does not get set.
Adding one that iterate over the provided dict and populate the UdfDictionary should be easy.
Feel free to give it a go if you want.

tcezard pushed a commit to EdinburghGenomics/pyclarity-lims that referenced this issue Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants