Add type to parent if missing
This commit is contained in:
parent
36932baa89
commit
b0aed1ca74
|
|
@ -92,6 +92,10 @@ export default {
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
addNote(id) {
|
addNote(id) {
|
||||||
|
if (!this.parent.hasOwnProperty('__typename')) {
|
||||||
|
this.parent.__typename = 'ContentBlockNode';
|
||||||
|
}
|
||||||
|
|
||||||
this.$store.dispatch('addNote', {
|
this.$store.dispatch('addNote', {
|
||||||
content: id,
|
content: id,
|
||||||
type: this.parent.__typename,
|
type: this.parent.__typename,
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ class AddNote(relay.ClientIDMutation):
|
||||||
user=user
|
user=user
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
instrument = BasicKnowledge.objects.get(slug=content_block_id)
|
instrument = BasicKnowledge.objects.get(slug=content_block_id)
|
||||||
bookmark = InstrumentBookmark.objects.get(
|
bookmark = InstrumentBookmark.objects.get(
|
||||||
instrument=instrument,
|
instrument=instrument,
|
||||||
uuid=content_uuid,
|
uuid=content_uuid,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue