Make URL a Field instead a property (#63)

This PR adds a new Field to all existing Models.
As its a data migrations the Migration is added.

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#63
This commit is contained in:
2025-08-27 06:46:09 +12:00
parent 6a4c8d96c3
commit 13816ecaf3
7 changed files with 2063 additions and 47 deletions

View File

@ -439,16 +439,7 @@ def scenarios(request):
if request.GET.get('all'):
return JsonResponse({
"objects": [
{"name": s.name, "url": s.full_url, "reviewed": True}
for s in reviewed_scenario_qs.annotate(
full_url=Concat(
Value(s.SERVER_URL + '/package/'),
F("package__uuid"),
Value("/scenario/"),
F("uuid"),
output_field=CharField(),
)
)
{"name": s.name, "url": s.url, "reviewed": True} for s in reviewed_scenario_qs
]
})