Skip to content

Commit 2cbc595

Browse files
authored
Merge pull request #5039 from rtibbles/hotfixes_into_unstable
Hotfixes into unstable
2 parents 14b0a31 + 3c43d8b commit 2cbc595

File tree

4 files changed

+195
-54
lines changed

4 files changed

+195
-54
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ migrate:
3838
# 4) Remove the management command from this `deploy-migrate` recipe
3939
# 5) Repeat!
4040
deploy-migrate:
41-
python contentcuration/manage.py rectify_incorrect_contentnode_source_fields
41+
echo "Nothing to do here!"
4242

4343
contentnodegc:
4444
python contentcuration/manage.py garbage_collect

contentcuration/contentcuration/frontend/channelEdit/views/files/__tests__/fileUpload.spec.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,12 @@ describe('fileUpload', () => {
6666
});
6767
describe('computed', () => {
6868
it('should map the files to the correct presets', () => {
69-
expect(wrapper.vm.primaryFileMapping[0].file.id).toBe('file-3');
70-
expect(wrapper.vm.primaryFileMapping[1].file.id).toBe('file-1');
69+
expect(wrapper.vm.primaryFileMapping.find(m => m.preset.id === 'epub').file.id).toBe(
70+
'file-3',
71+
);
72+
expect(wrapper.vm.primaryFileMapping.find(m => m.preset.id === 'document').file.id).toBe(
73+
'file-1',
74+
);
7175
expect(wrapper.vm.primaryFileMapping).toHaveLength(2);
7276
});
7377
it('should disallow file removal if there is only one primary file', () => {

contentcuration/contentcuration/frontend/shared/leUtils/FormatPresets.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const FormatPresetsMap = new Map([
173173
order: 3,
174174
kind_id: 'exercise',
175175
allowed_formats: ['png', 'jpg', 'jpeg', 'gif', 'svg'],
176-
associated_mimetypes: ['image/jpeg', 'image/svg', 'image/gif', 'image/png'],
176+
associated_mimetypes: ['image/jpeg', 'image/gif', 'image/png', 'image/svg'],
177177
},
178178
],
179179
[
@@ -304,6 +304,22 @@ const FormatPresetsMap = new Map([
304304
associated_mimetypes: ['.zip'],
305305
},
306306
],
307+
[
308+
'kpub',
309+
{
310+
id: 'kpub',
311+
readable_name: 'Kolibri HTML5 Article',
312+
multi_language: false,
313+
supplementary: false,
314+
thumbnail: false,
315+
subtitle: false,
316+
display: true,
317+
order: 1,
318+
kind_id: 'document',
319+
allowed_formats: ['kpub'],
320+
associated_mimetypes: ['application/kpub+zip'],
321+
},
322+
],
307323
[
308324
'low_res_video',
309325
{
@@ -522,6 +538,7 @@ export const FormatPresetsNames = {
522538
HTML5_THUMBNAIL: 'html5_thumbnail',
523539
HTML5_ZIP: 'html5_zip',
524540
IMSCP_ZIP: 'imscp_zip',
541+
KPUB: 'kpub',
525542
LOW_RES_VIDEO: 'low_res_video',
526543
QTI: 'qti',
527544
QTI_THUMBNAIL: 'qti_thumbnail',

0 commit comments

Comments
 (0)