Skip to content

Commit

Permalink
fix the problem of empty commits
Browse files Browse the repository at this point in the history
  • Loading branch information
khansadaoudi committed Sep 20, 2024
1 parent a8237ab commit 92ea517
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/sentence/SentenceCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,12 @@ export default defineComponent({
save(mode: string) {
const openedTreeUser = this.openTabUser;
let changedConllUser = this.username;
let updateCommit = true;
if (mode) changedConllUser = mode;
if (this.reactiveSentencesObj[this.openTabUser].exportConll() === this.sentenceData.conlls[this.openTabUser]) {
updateCommit = false;
}
const metaToReplace = {
user_id: changedConllUser,
timestamp: Math.round(Date.now()),
Expand All @@ -360,6 +364,7 @@ export default defineComponent({
sent_id: this.sentence.sent_id,
conll: exportedConll,
user_id: changedConllUser,
update_commit: updateCommit,
};
if (!this.sentence.sample_name) {
return;
Expand Down

0 comments on commit 92ea517

Please sign in to comment.