Skip to content

export-data command fails to complete if --before-date isn't set #96

@cjg89

Description

@cjg89

Describe the bug

See title. In particular, the line below throws a ValueError due to attempting to filter Email results by None when --before-date isn't set.
https://github.com/UCF/PostMaster/blob/master/manager/management/commands/export-data.py#L193

Steps to Reproduce

  1. Run python manage.py export-data --email="..."
  2. Wait a while
  3. Sadtimes

Expected Behavior

Because --before-date isn't a required param, I expect to be able to run the command without passing this param in, and have the command execute successfully.

Possible Fix

Set a default of the current date on self.before if --before-date is None?

Your environment:

n/a

Additional context

n/a

Metadata

Metadata

Labels

bugA problem with existing functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions