forked from enviPath/enviPy
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:
@ -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
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user