mirror of
https://github.com/djhackersdev/minime.git
synced 2026-04-25 08:06:45 -05:00
chuni: Fix upsert with an empty userRecentRating
This commit is contained in:
parent
71a7cd7eed
commit
9b22318934
|
|
@ -34,6 +34,12 @@ export class SqlUserRecentRatingRepository
|
|||
profileId: Id<UserDataItem>,
|
||||
objs: UserRecentRatingItem[]
|
||||
): Promise<void> {
|
||||
// Don't do anything if there's nothing to save,
|
||||
// since trying to execute an empty insert statement fails.
|
||||
if (objs.length === 0) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
const stmt = sql
|
||||
.insert(
|
||||
"cm_user_recent_rating",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user