GraphSense-Maltego-transform icon indicating copy to clipboard operation
GraphSense-Maltego-transform copied to clipboard

Entity creation, simplify error handling, format and lint code

Open soad003 opened this issue 11 months ago • 1 comments

The current version of the code does not create any new entities in maltego if tags are available for the requested address. This is because the triple returned by get_address_details and get_entity_details was not handled properly (see https://github.com/INTERPOL-Innovation-Centre/GraphSense-Maltego-transform/blob/d3adadcce611b94c0f79969fc2117fbe281e4f9f/api/utils.py#L91 and for example https://github.com/INTERPOL-Innovation-Centre/GraphSense-Maltego-transform/blob/d3adadcce611b94c0f79969fc2117fbe281e4f9f/transforms/ToTags.py#L45-L54).

Whenever tags where available the error handling code simply printed a Maltego UI Msg but did not add the properties to the Maltego entity.

This PR should fix this issue. I also simplified the error handling code a bit, to avoid duplication.

Hope this helps.

soad003 avatar Jul 10 '23 15:07 soad003