Can now edit track copyright information
This commit is contained in:
parent
45142bf24b
commit
0ce51d25d4
|
@ -21,4 +21,4 @@ class TrackMutationSerializer(mutations.UpdateMutationSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.Track
|
model = models.Track
|
||||||
fields = ["license", "title", "position"]
|
fields = ["license", "title", "position", "copyright"]
|
||||||
|
|
|
@ -36,6 +36,17 @@ def test_track_title_mutation(factories, now):
|
||||||
assert track.title == "bar"
|
assert track.title == "bar"
|
||||||
|
|
||||||
|
|
||||||
|
def test_track_copyright_mutation(factories, now):
|
||||||
|
track = factories["music.Track"](copyright="foo")
|
||||||
|
mutation = factories["common.Mutation"](
|
||||||
|
type="update", target=track, payload={"copyright": "bar"}
|
||||||
|
)
|
||||||
|
mutation.apply()
|
||||||
|
track.refresh_from_db()
|
||||||
|
|
||||||
|
assert track.copyright == "bar"
|
||||||
|
|
||||||
|
|
||||||
def test_track_position_mutation(factories):
|
def test_track_position_mutation(factories):
|
||||||
track = factories["music.Track"](position=4)
|
track = factories["music.Track"](position=4)
|
||||||
mutation = factories["common.Mutation"](
|
mutation = factories["common.Mutation"](
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
:object="object"
|
:object="object"
|
||||||
:can-edit="canEdit"
|
:can-edit="canEdit"
|
||||||
:licenses="licenses"></edit-form>
|
:licenses="licenses"></edit-form>
|
||||||
|
<div v-else class="ui inverted active dimmer">
|
||||||
|
<div class="ui loader"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -10,13 +10,6 @@ export default {
|
||||||
label: this.$pgettext('Content/Track/*/Noun', 'Title'),
|
label: this.$pgettext('Content/Track/*/Noun', 'Title'),
|
||||||
getValue: (obj) => { return obj.title }
|
getValue: (obj) => { return obj.title }
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'license',
|
|
||||||
type: 'license',
|
|
||||||
required: false,
|
|
||||||
label: this.$pgettext('Content/*/*/Noun', 'License'),
|
|
||||||
getValue: (obj) => { return obj.license },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'position',
|
id: 'position',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
@ -24,7 +17,21 @@ export default {
|
||||||
required: false,
|
required: false,
|
||||||
label: this.$pgettext('*/*/*/Short, Noun', 'Position'),
|
label: this.$pgettext('*/*/*/Short, Noun', 'Position'),
|
||||||
getValue: (obj) => { return obj.position }
|
getValue: (obj) => { return obj.position }
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
id: 'copyright',
|
||||||
|
type: 'text',
|
||||||
|
required: false,
|
||||||
|
label: this.$pgettext('Content/Track/*/Noun', 'Copyright'),
|
||||||
|
getValue: (obj) => { return obj.copyright }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'license',
|
||||||
|
type: 'license',
|
||||||
|
required: false,
|
||||||
|
label: this.$pgettext('Content/*/*/Noun', 'License'),
|
||||||
|
getValue: (obj) => { return obj.license },
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue