Skip to content

Add collection_date to export file name - #56

Open
luelista wants to merge 3 commits into
masterfrom
ux-improvements2
Open

luelista wants to merge 3 commits into
masterfrom
ux-improvements2

Conversation

@luelista

Copy link
Copy Markdown
Member

No description provided.

Base automatically changed from ux-improvements to master January 21, 2025 13:58
Comment thread pretix_sepadebit/views.py
else:
exp = SepaExport(organizer=request.organizer, xmldata="")
exp.testmode = False
if type(key) is tuple: exp.collection_date = key[1]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
if type(key) is tuple: exp.collection_date = key[1]
if isinstance(key, tuple):
exp.collection_date = key[1]

Comment thread pretix_sepadebit/views.py
else self.request.organizer.slug.upper()
),
self.object.datetime.strftime("%Y-%m-%d-%H-%M-%S"),
self.object.collection_date and self.object.collection_date.strftime("--%Y-%m-%d"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

False looks a little weird in a filename?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
self.object.collection_date and self.object.collection_date.strftime("--%Y-%m-%d"),
self.object.collection_date.strftime("--%Y-%m-%d") if self.object.collection_date else "",

{% endif %}
</td>
<td>
{{ export.collection_date|date:"SHORT_DATE_FORMAT" }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't you think this will be confusing with an empty column for files containing multiple collection dates (mode = mix)?

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