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

Add bandref to RasterInfoModel #230

Merged
merged 1 commit into from
Jul 15, 2021
Merged

Add bandref to RasterInfoModel #230

merged 1 commit into from
Jul 15, 2021

Conversation

mmacata
Copy link
Member

@mmacata mmacata commented Jul 15, 2021

In GRASS GIS, r.info -gre now adds a new parameter bandref. As this was not included in the RasterInfoModel, requesting the RasterLayerResource leaded to an error:

exception": {
"message": "The model \"RasterInfoModel\" does not have an attribute \"bandref\"",
"traceback": [
"  File \"/usr/lib/python3.8/site-packages/actinia_core/rest/ephemeral_processing.py\", line 1732, in run\n    self._execute()\n",
"  File \"/usr/lib/python3.8/site-packages/actinia_core/rest/raster_layer.py\", line 314, in _execute\n    self.module_results = RasterInfoModel(**raster_info)\n",
"  File \"/usr/lib/python3.8/site-packages/flask_restful_swagger_2/__init__.py\", line 336, in __init__\n    raise ValueError(\n"
],
"type": "<class 'ValueError'>"
},

This PR adds the missing parameter to the model.

Tested with GRASS GIS 7.8 as well, so if r.info -gre does not return bandref, it is simply left out and response is successful.

@mmacata mmacata requested review from metzm and anikaweinmann July 15, 2021 08:22
Copy link
Member

@anikaweinmann anikaweinmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you

@mmacata mmacata merged commit 73a1a12 into actinia-org:main Jul 15, 2021
Copy link
Contributor

@metzm metzm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, please merge!

@mmacata mmacata deleted the bandref branch August 10, 2021 14:12
@mmacata mmacata added this to the 1.0.3 milestone Nov 9, 2022
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

Successfully merging this pull request may close these issues.

3 participants