gchq / gaffer-tools

gaffer-tools is deprecated. Use https://github.com/gchq/gafferpy instead
Apache License 2.0
50 stars 29 forks source link

Gh 851 from json error #887

Closed t92549 closed 3 years ago

t92549 commented 3 years ago

Closes #851

t92549 commented 3 years ago

So far, the GetWalks operation and from_json functions have been fixed. However, a lot of operations have the same issue that needs fixing as GetWalks. e.g. in Conditional: https://github.com/gchq/gaffer-tools/blob/b3dc1f0b41fd1bb4a4e22ad713ce13b672db33d7/python-shell/src/gafferpy/gaffer_operations.py#L2640-L2643 The issue is if the input is not an operation of the correct type, it is presumed that the input is json, not an operation of the wrong type. Therefore, for this PR to be ready for review, these need to be fixed in the same way that GetWalks was.

t92549 commented 3 years ago

This PR will stick to the scope of making the from_json function behave more intuitively and fixing up the error handling in the GetWalks operation. The fixing of other operations which have the similar problem of not correctly handing edge cases will be covered by #896