Fix non-integer userID in settings table
A submitted database had a text userID with a trailing "A0. Not sure how that happened -- it doesn't appear to be possible in current code -- but it caused group permissions not to be properly synced.
This commit is contained in:
parent
8d8109dbac
commit
26056c87f1
2 changed files with 11 additions and 1 deletions
|
|
@ -2441,6 +2441,16 @@ Zotero.Schema = new function(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (i == 102) {
|
||||||
|
let userID = yield Zotero.DB.valueQueryAsync("SELECT value FROM settings WHERE setting='account' AND key='userID'");
|
||||||
|
if (userID && typeof userID == 'string') {
|
||||||
|
userID = userID.trim();
|
||||||
|
if (userID) {
|
||||||
|
yield Zotero.DB.queryAsync("UPDATE settings SET value=? WHERE setting='account' AND key='userID'", parseInt(userID));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If breaking compatibility or doing anything dangerous, clear minorUpdateFrom
|
// If breaking compatibility or doing anything dangerous, clear minorUpdateFrom
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
-- 101
|
-- 102
|
||||||
|
|
||||||
-- Copyright (c) 2009 Center for History and New Media
|
-- Copyright (c) 2009 Center for History and New Media
|
||||||
-- George Mason University, Fairfax, Virginia, USA
|
-- George Mason University, Fairfax, Virginia, USA
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue