Skip to content

Conversation

@ThiefMaster
Copy link
Member

Currently this logs all changes, since a diff log would be hard since most options are provided by the payment plugin and not known to the core.

I might change it to at least skip the enabled flag and only log things that actually changed...

@ThiefMaster ThiefMaster added this to the v3.3 milestone Feb 10, 2025
self.plugin.event_settings.set_multi(self.event, form.data)
match plugin_event_settings.get('enabled'), form.enabled.data:
case True, False:
self.event.log(EventLogRealm.management, LogKind.negative, 'Payment',
Copy link
Member

@tomasr8 tomasr8 Feb 10, 2025

Choose a reason for hiding this comment

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

Maybe at some point the module names could become an enum as well?

Copy link
Member Author

@ThiefMaster ThiefMaster Feb 10, 2025

Choose a reason for hiding this comment

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

Not sure, we have MANY different ones... I guess we could use an enum for the string, but I would not store it as an enum in the DB, since that'd make adding new ones a bit of a pain.

It would also not be particularly plugin-friendly if using an enum was required :)

Copy link
Member

Choose a reason for hiding this comment

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

I suggested an enum just to avoid accidentally creating similar-but-different categories like Payment and Payments, I wouldn't want to enforce it at the DB-level but just to make it easier for us to know what categories already exist :)

@ThiefMaster ThiefMaster force-pushed the log-payment-config branch 2 times, most recently from ab886bc to 08d1a28 Compare February 10, 2025 13:15
@ThiefMaster ThiefMaster enabled auto-merge (squash) March 18, 2025 16:14
@ThiefMaster ThiefMaster merged commit 1ae7829 into indico:master Mar 18, 2025
9 of 10 checks passed
@ThiefMaster ThiefMaster deleted the log-payment-config branch March 18, 2025 16:19
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