fix: address code review points for cycle regeneration

1. Fix critical notifications bug
2. Fix today inconsistency
3. Add advisory lock around deletion
4. Improve helper function documentation
5. Improve error message UX
This commit is contained in:
Moritz 2025-12-15 13:12:17 +01:00
parent b8791cbcfe
commit 358b1bfdb1
Signed by: moritz
GPG key ID: 1020A035E5DD0824
3 changed files with 79 additions and 17 deletions

View file

@ -116,7 +116,10 @@ defmodule Mv.MembershipFees.Changes.ValidateSameInterval do
# Add validation error when types cannot be loaded
defp add_type_validation_error(changeset, _reason) do
message = "Could not validate membership fee type intervals: type not found"
message =
"Could not validate membership fee type intervals. " <>
"The current or new membership fee type no longer exists. " <>
"This may indicate a data consistency issue."
Ash.Changeset.add_error(
changeset,