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

DD-1625 deposit-create-report: stuur geen report als er geen records zijn #65

Conversation

aliassheikh
Copy link
Contributor

@aliassheikh aliassheikh commented Aug 23, 2024

Fixes DD-1625 deposit-create-report: stuur geen report als er geen records zijn

Description of changes

deposit-creat-report script checked for an empty report, it is when there are no selected/filtered records. If it is empty, it doesn't send emails to recipients.

Note:
The an empty response of the server is dependent on the Accept header:

  • {'Accept': 'text/csv'} --> ' '
  • {'Accept': 'application/json'} --> []

How to test

For example run in vagrant:

  • /usr/local/bin/deposit-create-report --user 001 --email-to <your email> --> should get an email
  • /usr/local/bin/deposit-create-report --user 010 --email-to <your email> --> should not get an email

Related PRs

(Add links)

Notify

@DANS-KNAW/core-systems

@aliassheikh aliassheikh requested a review from a team as a code owner August 23, 2024 11:50
@janvanmansum janvanmansum merged commit 19e3215 into DANS-KNAW:master Aug 23, 2024
3 checks passed
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.

2 participants