diff --git a/djangorota/rota/views.py b/djangorota/rota/views.py index 29df807..512a795 100644 --- a/djangorota/rota/views.py +++ b/djangorota/rota/views.py @@ -164,6 +164,10 @@ def rota_detail(request, rota_id): try: opts = rota.options or {} for k, v in opts.items(): + # Only surface keys that correspond to the typed RotaConstraintOptions + # (exclude builder/constructor args and other non-constraint keys). + if k not in available_constraints_rich: + continue # pretty-print complex values where appropriate try: pretty = json.dumps(v, indent=2, default=str)