Open terjekv opened 2 months ago
I'm not sure why this was ever done, but it seems very very broken:
https://github.com/unioslo/mreg/blob/eed5c154bcc47b1dea474feabad46125ebde0aec/mreg/api/v1/views_labels.py#L30 https://github.com/unioslo/mreg/blob/eed5c154bcc47b1dea474feabad46125ebde0aec/mreg/api/v1/views.py#L187
The label has a proper ID. Using the label won't work, but we could use https://github.com/unioslo/mreg/blob/eed5c154bcc47b1dea474feabad46125ebde0aec/mreg/api/v1/urls.py#L33 to look up the label by name... But this isn't the endpoint the Location header points to...
Needs fixing. Badly.
I'm not sure why this was ever done, but it seems very very broken:
https://github.com/unioslo/mreg/blob/eed5c154bcc47b1dea474feabad46125ebde0aec/mreg/api/v1/views_labels.py#L30 https://github.com/unioslo/mreg/blob/eed5c154bcc47b1dea474feabad46125ebde0aec/mreg/api/v1/views.py#L187
The label has a proper ID. Using the label won't work, but we could use https://github.com/unioslo/mreg/blob/eed5c154bcc47b1dea474feabad46125ebde0aec/mreg/api/v1/urls.py#L33 to look up the label by name... But this isn't the endpoint the Location header points to...
Needs fixing. Badly.