Commit 0e6cd827 authored by onny's avatar onny
Browse files

fix submitting project for artist

parent 13b80b97
......@@ -23,7 +23,7 @@ var demo = new Vue({
addProject: function () {
var newProject = {
name: this.project.name.trim(),
artist: this.artist.id['id']
artist: this.artist.id
};
axios
.post('http://127.0.0.1:8000/api/project/', newProject);
......
......@@ -14,7 +14,7 @@
<form v-on:submit.prevent class="form-group col-sm-8 form-horizontal">
<label class="form-label" for="project">Belongs to artist</label>
<select id="artist" name="artist" v-model="artist.id">
<option v-for="(artist, index) in artist" :value="artist" selected>[[ artist.name ]]</option>
<option v-for="(artist, index) in artist" :value="artist.id" selected>[[ artist.name ]]</option>
</select>
<br>
<label class="form-label" for="name">Name</label>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment