mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 07:03:44 +00:00
Merge pull request #2919 from overleaf/ta-admin-update-empty
Allow Empty Strings in Admin Form Updates GitOrigin-RevId: 79c1315dcb56ebdd82094653c67dcd83b1b53b87
This commit is contained in:
parent
cc46e33681
commit
366a925903
1 changed files with 6 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
const { ObjectId } = require('../../../../app/src/infrastructure/mongojs')
|
||||
const { db, ObjectId } = require('../../../../app/src/infrastructure/mongojs')
|
||||
const { expect } = require('chai')
|
||||
const SubscriptionUpdater = require('../../../../app/src/Features/Subscription/SubscriptionUpdater')
|
||||
const SubscriptionModel = require('../../../../app/src/models/Subscription')
|
||||
|
@ -14,6 +14,7 @@ class Subscription {
|
|||
this.manager_ids = options.managerIds || [this.admin_id]
|
||||
this.member_ids = options.memberIds || []
|
||||
this.invited_emails = options.invitedEmails || []
|
||||
this.teamName = options.teamName
|
||||
this.teamInvites = options.teamInvites || []
|
||||
this.planCode = options.planCode
|
||||
this.recurlySubscription_id = options.recurlySubscription_id
|
||||
|
@ -38,6 +39,10 @@ class Subscription {
|
|||
)
|
||||
}
|
||||
|
||||
get(callback) {
|
||||
db.subscriptions.findOne({ _id: ObjectId(this._id) }, callback)
|
||||
}
|
||||
|
||||
setManagerIds(managerIds, callback) {
|
||||
return SubscriptionModel.findOneAndUpdate(
|
||||
{ _id: ObjectId(this._id) },
|
||||
|
|
Loading…
Reference in a new issue