Skip to content

Commit

Permalink
Merge pull request #72 from ExtensionEngine/release/2.4
Browse files Browse the repository at this point in the history
Release/2.4.1
  • Loading branch information
underscope authored Mar 30, 2018
2 parents 4b08a4a + f1892f7 commit e4b5a42
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tailor",
"version": "2.4.0",
"version": "2.4.1",
"description": "Course authoring platform",
"author": "ExtensionEngine <info@extensionengine.com>",
"private": true,
Expand Down
3 changes: 2 additions & 1 deletion server/course/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { getObjectives, getSchemaId } = require('../../config/shared/activities')
const addHooks = require('../shared/util/addHooks');
const find = require('lodash/find');
const first = require('lodash/first');
const get = require('lodash/get');
const logger = require('../shared/logger');
const map = require('lodash/map');

Expand Down Expand Up @@ -29,7 +30,7 @@ function add(Course, models) {
const instance = Array.isArray(data)
? find(data, { type: 'ASSESSMENT' })
: data;
if (instance.type !== 'ASSESSMENT') return;
if (get(instance, 'type') !== 'ASSESSMENT') return;
const { id, courseId, type } = instance;
logger.info(`[Course] TeachingElement#${hook}`, { type, id, courseId });
const where = { courseId, type: 'ASSESSMENT', detached: false };
Expand Down

0 comments on commit e4b5a42

Please sign in to comment.