Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Search problem for experiments with same Name #62

Open
InnocentBug opened this issue Nov 28, 2022 · 0 comments
Open

Search problem for experiments with same Name #62

InnocentBug opened this issue Nov 28, 2022 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@InnocentBug
Copy link
Contributor

When using the get it is not straight forward to find a non-uniquely named experiment.

For me this code:

    host = "criptapp.org"
    token = argv[0]
    cript.API(host, token)

    proj = cript.Project.get(name="Monomeric sidechain dipole orientation and its effect on microphase separation: experiment and simulation via structural isomer variation")

    coll = cript.Collection.get(name="3-mer simulations")
    expt = cript.Experiment.get(name="test")

Results in a cript.api.exceptions.APIError: Server error 403

I assume that there is another Experiment with the name test that I don't have access to.
Even though there is an Experiment in my collection with that name!

The response of get should default to an object that the user has access to.
And ONLY if there is no findable object with access permission should it return a 403.

It would also help if I could use get like.

   expt = cript.Experiment.get(name="test", collection=coll)

But that throws an TypeError: Object of type Collection is not JSON serializable

@InnocentBug InnocentBug added bug Something isn't working enhancement New feature or request labels Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant