Updating with two GeoPoints fails correctly. (#4162)
This commit is contained in:
committed by
Florent Vilmart
parent
406a21e967
commit
cf630ba462
@@ -661,9 +661,11 @@ export default class SchemaController {
|
||||
return this._dbAdapter.addFieldIfNotExists(className, fieldName, type).then(() => {
|
||||
// The update succeeded. Reload the schema
|
||||
return this.reloadData({ clearCache: true });
|
||||
}, () => {
|
||||
//TODO: introspect the error and only reload if the error is one for which is makes sense to reload
|
||||
|
||||
}, (error) => {
|
||||
if (error.code == Parse.Error.INCORRECT_TYPE) {
|
||||
// Make sure that we throw errors when it is appropriate to do so.
|
||||
throw error;
|
||||
}
|
||||
// The update failed. This can be okay - it might have been a race
|
||||
// condition where another client updated the schema in the same
|
||||
// way that we wanted to. So, just reload the schema
|
||||
|
||||
Reference in New Issue
Block a user