dasch-swiss / dsp-api

DaSCH Service Platform API
http://dasch-swiss.github.io/dsp-api/
Apache License 2.0
74 stars 18 forks source link

update project #680

Open kilchenmann opened 6 years ago

kilchenmann commented 6 years ago

In Salsah we have a project form, which is used to create new projects, but also to edit existing projects. The "create process" (post) works fine. But the "edit process" (put) is not able to update the shortcode value. I know, that it's not possible to edit the shortcode, when it already exists; in that case, the input field for shortcode is disabled. But most of the knora test project doesn't have a shortcode value. At the moment it isn't so easy to test the form or to figure out, where the error happens.

And there's another error with empty description fields; is it a required one? I get the following error:

"org.knora.webapi.TriplestoreResponseException: Triplestore responded with HTTP code 500 Internal Server Error: org.eclipse.rdf4j.query.UpdateExecutionException: org.eclipse.rdf4j.repository.RepositoryException: org.eclipse.rdf4j.sail.SailException: java.lang.Exception: Consistency check empty_string_0 failed:↵http://rdfh.ch/projects/yTerZGyxjZVqFMNNKXCDPF http://www.knora.org/ontology/knora-base#projectDescription ""^^http://www.w3.org/2001/XMLSchema#string↵"

With this data: screen shot 2017-12-08 at 16 57 12

Btw in Knora I'm on the develop branch.

subotic commented 6 years ago

Only the images project has a shortcode, so you could use this project.

kilchenmann commented 6 years ago

Yes I know. But anyway I can't update the project info.

subotic commented 6 years ago

The SPARQL for updating the project has a problem. I didn't think about the case of removing the project description.

subotic commented 6 years ago

If you try adding something like a - instead of nothing, it should work.

kilchenmann commented 6 years ago

Then I have to set the description as a required field. I will do it right now...

subotic commented 6 years ago

Does it make sense for a project to not have a description? Maybe I should also make this on the API level required?

mrivoal commented 6 years ago

The question wasn't directed to me, but I don't think it makes sense...

Besides, we should enforce in the coming months the projects to provide more extensive metadata.