mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 07:39:02 +02: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:
@@ -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) },
|
||||
|
||||
Reference in New Issue
Block a user