0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-02 04:12:47 +00:00

Fix regression with saving.

This commit is contained in:
Trevor Buckner
2021-06-20 16:05:36 -04:00
parent 6ecf546baf
commit d61fda9cff
2 changed files with 2 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ const getBrewFromId = asyncHandler(async (id, accessType)=>{
brew = await GoogleActions.readFileMetadata(config.get('google_api_key'), googleId, id, accessType);
} else {
brew = await HomebrewModel.get(accessType == 'edit' ? { editId: id } : { shareId: id });
brew = brew.toObject(); // Convert MongoDB object to standard Javascript Object
}
brew = sanitizeBrew(brew, accessType === 'edit' ? false : true);