Skip to content

Commit 69c21d5

Browse files
authored
Merge pull request #305 from developmentseed/fix/285-empty-data
Fixes #285
2 parents d382fe1 + 8f8b6f5 commit 69c21d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/manage/teams.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ async function updateTeam (req, reply) {
122122
await profile.setProfile(tags, 'team', id)
123123
}
124124
const teamData = dissoc('tags', body)
125-
const data = await team.update(id, teamData)
126-
reply.send(data)
125+
let updatedTeam = {}
126+
if (teamData) {
127+
updatedTeam = await team.update(id, teamData)
128+
}
129+
reply.send(updatedTeam)
127130
} catch (err) {
128131
console.log(err)
129132
return reply.boom.badRequest(err.message)

0 commit comments

Comments
 (0)