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

[update_vn] Can't update form observation #141

Closed
dthonon opened this issue Mar 2, 2021 · 10 comments
Closed

[update_vn] Can't update form observation #141

dthonon opened this issue Mar 2, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@dthonon
Copy link
Owner

dthonon commented Mar 2, 2021

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.

  • Standard observations path:
['data']['sightings'][0]['observers'][0]
  • form observations path:
['data']['forms'][0]['sightings'][0]['observers'][0]

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
Copy link
Owner Author

dthonon commented Mar 25, 2021

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
Copy link
Owner Author

dthonon commented Mar 25, 2021

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
Copy link
Owner Author

dthonon commented Mar 26, 2021

mentioned in commit ad10f37

@dthonon
Copy link
Owner Author

dthonon commented Mar 27, 2021

mentioned in commit 9515fa7

@dthonon
Copy link
Owner Author

dthonon commented Mar 28, 2021

mentioned in commit 8f15501

@dthonon
Copy link
Owner Author

dthonon commented Mar 31, 2021

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
Copy link
Owner Author

dthonon commented Mar 31, 2021

mentioned in commit 11d9963

@dthonon
Copy link
Owner Author

dthonon commented Mar 31, 2021

mentioned in commit 4f538f8

@dthonon
Copy link
Owner Author

dthonon commented Apr 1, 2021

mentioned in commit 46bf4aa

@dthonon
Copy link
Owner Author

dthonon commented Apr 5, 2021

mentioned in commit dde6cfd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant