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

[ExportReportPdf] list params fixed (#9082) #3040

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

ValentinBouzinFiligran
Copy link
Member

@ValentinBouzinFiligran ValentinBouzinFiligran commented Nov 27, 2024

Proposed changes

  • fix list search in case of list params equal None
  • fix file markings on selection

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality using different use cases
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

It crashed when we tried to export a selection of entities with file_markings.
Then another case was fixed: it would also crash when list_params was empty.
ask Nino for more infos if needed

@ValentinBouzinFiligran ValentinBouzinFiligran added the filigran team use to identify PR from the Filigran team label Nov 27, 2024
@ValentinBouzinFiligran ValentinBouzinFiligran marked this pull request as ready for review November 28, 2024 07:35
@ValentinBouzinFiligran ValentinBouzinFiligran linked an issue Nov 28, 2024 that may be closed by this pull request
@@ -193,13 +193,19 @@ def _process_list(

if entities_list is not None:
list_marking = None
if file_markings:
list_marking = file_markings[-1]["definition"]
if len(file_markings) != 0:
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure file_markings is always a defined array ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question !
From the client, we send an array
And I tried from the graphql playground, if I send null or undefined ( or anything else that isn't an array ) it throws me an error

@CelineSebe
Copy link
Member

Tested👌

@ValentinBouzinFiligran ValentinBouzinFiligran merged commit 11ab0ad into master Dec 3, 2024
4 checks passed
@ValentinBouzinFiligran ValentinBouzinFiligran deleted the issue/9082 branch December 3, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants