Merge branch 'hotfix/instrument-field-ms-398' into develop

This commit is contained in:
Christian Cueni 2021-11-29 12:04:43 +01:00
commit 812be67247
4 changed files with 31 additions and 7 deletions

View File

@ -30,14 +30,13 @@
data() {
return {
module: {},
updateSent: false
};
},
created() {
this.$log.debug('**** module.vue created ****');
this.$log.debug(`||| module id ${this.module.id} |||`);
this.updateLastVisitedModule(this.module.id);
},
mounted() {
this.$log.debug('**** module.vue mounted ****');
@ -54,10 +53,13 @@
update(data) {
return this.$getRidOfEdges(data).module || {};
},
// result({data: {module: {id}}}) {
// this.$log.debug(`=== updating result for module ${id} ===`);
// this.updateLastVisitedModule(id);
// },
result({data: {module: {id}}}) {
if (!this.updateSent) {
this.$log.debug(`=== updating result for module ${id} ===`);
this.updateLastVisitedModule(id);
this.updateSent = true;
}
},
fetchPolicy: 'cache-first',
};
},

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.24 on 2021-11-29 10:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('basicknowledge', '0013_auto_20211110_1140'),
]
operations = [
migrations.AlterField(
model_name='basicknowledge',
name='old_type',
field=models.CharField(blank=True, choices=[('language_communication', 'Sprache & Kommunikation'), ('society', 'Gesellschaft'), ('interdisciplinary', 'Überfachliches Instrument')], max_length=100),
),
]

View File

@ -57,7 +57,8 @@ class BasicKnowledge(StrictHierarchyPage):
old_type = models.CharField(
max_length=100,
choices=InstrumentType.CATEGORY_CHOICES
choices=InstrumentType.CATEGORY_CHOICES,
blank=True
)
content_panels = [

View File

@ -34,6 +34,9 @@ def get_room_blocks(page):
def get_block_from_stream_data(stream_data, block_name):
if len(stream_data) == 0:
return []
if isinstance(stream_data[0], tuple):
return [block for block in stream_data if block[0] in [block_name]]
if isinstance(stream_data[0], dict):