dthonon / Client_API_VN

Export from VisioNature (Biolovision) web site to local postgresql database
GNU General Public License v3.0
3 stars 1 forks source link

[update_vn] Can't update form observation #141

Closed dthonon closed 2 years ago

dthonon commented 3 years ago

In GitLab by @fred.lpo07 on Mar 2, 2021, 14:46

Form observation path is not the same that classic observation path which cause error while trying to update.

error:

2021-03-02 14:40:27,635 - INFO - update_vn.update - Site vnauv : mise à jour de l'observation 5358836, opération replace
Traceback (most recent call last):
  File "/home/fcloitre/.pyenv/versions/3.8.6/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/fcloitre/.pyenv/versions/3.8.6/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/fcloitre/.pyenv/versions/client_api_vn/lib/python3.8/site-packages/update/update_vn.py", line 257, in <module>
    run()
  File "/home/fcloitre/.pyenv/versions/client_api_vn/lib/python3.8/site-packages/update/update_vn.py", line 252, in run
    main(sys.argv[1:])
  File "/home/fcloitre/.pyenv/versions/client_api_vn/lib/python3.8/site-packages/update/update_vn.py", line 244, in main
    update(cfg_ctrl, args.input)
  File "/home/fcloitre/.pyenv/versions/client_api_vn/lib/python3.8/site-packages/update/update_vn.py", line 131, in update
    sighting["data"]["sightings"][0]["observers"][0],
IndexError: list index out of range
dthonon commented 3 years ago

In GitLab by @jgc_lpoaura on Mar 25, 2021, 13:21

Daniel, nous sommes coincés par ce point pour modifier des données dans la base. Penses-tu que les évolutions sont "faciles" à faire pour pouvoir modifier par API des données ? A très court terme, on a besoin de modifier des codes études pour gérer au mieux les métadonnées. Bcp de données étant collectées en formulaire, on ne peut pas le faire... Merci d'avance

dthonon commented 3 years ago

Bonjour D'après mes premiers tests, c'est un problème dans L'API. J'ai posé une question sur la liste visionature, mais sans réponse. Je vais relancer. Cordialement Daniel

dthonon commented 3 years ago

mentioned in commit ad10f37f287296639b8bc48473255dac41f1a4da

dthonon commented 3 years ago

mentioned in commit 9515fa739e3f8d89159ffad284407b7512dbf93b

dthonon commented 3 years ago

mentioned in commit 8f15501da7eb326fa013b6b8113af3f4c86b54cd

dthonon commented 3 years ago

Changing data of a sighting inside a forms should use the simple path Isère;3079911;$['data']['sightings'][0]['observers'][0]['project'];replace;26 and not include ['forms'][0].

dthonon commented 3 years ago

mentioned in commit 11d99636d51202c0f1cfb4ba0d55c71f5499dd8e

dthonon commented 3 years ago

mentioned in commit 4f538f835646f7b7c658da435d6c95ff670e4eee

dthonon commented 3 years ago

mentioned in commit 46bf4aab551600b3d550519a40c63554f6b2d4ec

dthonon commented 3 years ago

mentioned in commit dde6cfdddc538ba5a15cfffba975259570c8ab1a