Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixed title when syncing after gtt create
  • Loading branch information
Andreas Müller committed Dec 7, 2022
commit 98c5a94f7ef94bb439c3bc0334a3193ea4b00120
6 changes: 4 additions & 2 deletions src/include/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class tasks {
this.sync.resources[project][type][id]
.make(project, id, frame.resource.new)
.then(() => {
frame.title = this.sync.resources[type][id].data.title;
if (callback) callback();
done();
})
Expand All @@ -82,8 +81,10 @@ class tasks {
let project = frame.project,
type = frame.resource.type,
id = frame.resource.id;

if(id in this.sync.resources[project][type]) {
frame.title = this.sync.resources[project][type][id].data.title;
}

return done();
});
}
Expand Down Expand Up @@ -116,6 +117,7 @@ class tasks {
.then(() => {
if (frame.resource.new) {
delete frame.resource.new;
frame.resource.title = frame.resource.id;
frame.resource.id = resource.data.iid;
}

Expand Down
2 changes: 1 addition & 1 deletion src/models/hasTimes.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class hasTimes extends Base {
* @returns {*}
*/
createTime(time, created_at, note) {
if(note === null) {
if(note === null || note === undefined) {
note = '';
}
else {
Expand Down