forked from vikunja/frontend
Fix saving settings when no default list was selected
This commit is contained in:
parent
901aabe976
commit
dc0a2defda
|
@ -36,7 +36,6 @@ describe('User Settings', () => {
|
||||||
.contains('Save')
|
.contains('Save')
|
||||||
.click()
|
.click()
|
||||||
|
|
||||||
cy.wait(3000) // Wait for the request to finish
|
|
||||||
cy.get('.global-notification')
|
cy.get('.global-notification')
|
||||||
.should('contain', 'Success')
|
.should('contain', 'Success')
|
||||||
cy.get('.navbar .user .username')
|
cy.get('.navbar .user .username')
|
||||||
|
|
|
@ -440,7 +440,7 @@ export default {
|
||||||
updateSettings() {
|
updateSettings() {
|
||||||
localStorage.setItem(playSoundWhenDoneKey, this.playSoundWhenDone)
|
localStorage.setItem(playSoundWhenDoneKey, this.playSoundWhenDone)
|
||||||
saveLanguage(this.language)
|
saveLanguage(this.language)
|
||||||
this.settings.defaultListId = this.defaultList.id
|
this.settings.defaultListId = this.defaultList ? this.defaultList.id : 0
|
||||||
|
|
||||||
this.userSettingsService.update(this.settings)
|
this.userSettingsService.update(this.settings)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
Loading…
Reference in New Issue