summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages/models/_id/edit.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/pages/models/_id/edit.vue b/pages/models/_id/edit.vue
index 7b8155e..8ced3e2 100644
--- a/pages/models/_id/edit.vue
+++ b/pages/models/_id/edit.vue
@@ -42,9 +42,10 @@ export default {
if (response.status != 200) {
window.location.href = "/models";
} else {
- this.model = response.data;
- if (!(this.model.author_id == this.me.id || this.me.is_staff)) {
+ if (!(response.data.author_id == this.me.id || this.me.is_staff)) {
window.location.href = "/models/" + this.id;
+ } else {
+ this.model = response.data;
}
}
});