Skip to content

Commit

Permalink
Allow templates with empty task types
Browse files Browse the repository at this point in the history
  • Loading branch information
anarute committed Dec 18, 2023
1 parent 2e6c68f commit 33b8cc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/js/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ Ext.onReady(function(){
// Create and populate a record
var newTask = new taskRecord();
newTask.set('projectId', templateValues['projectId']);
if(templateValues && !taskTypeStore.data.items.some(x => x.id == templateValues['ttype'])){
if(templateValues && templateValues['ttype'] && !taskTypeStore.data.items.some(x => x.id == templateValues['ttype'])){
let message = `Task type of ${templateValues['ttype']} is not valid. The task type may have been deactivated. Please choose another task type.`
App.setAlert(false, message);
} else {
Expand Down

0 comments on commit 33b8cc3

Please sign in to comment.