Defaulted to 'active' status when creating Offers
refs https://github.com/TryGhost/Team/issues/1131 This ensures that Offers are active by default.
This commit is contained in:
parent
a772f5b82f
commit
04b9944e67
@ -259,7 +259,7 @@ class Offer {
|
||||
const type = OfferType.create(data.type);
|
||||
const cadence = OfferCadence.create(data.cadence);
|
||||
const duration = OfferDuration.create(data.duration, data.duration_in_months);
|
||||
const status = OfferStatus.create(data.status);
|
||||
const status = OfferStatus.create(data.status || 'active');
|
||||
|
||||
if (cadence.value === 'year' && duration.value.type === 'repeating') {
|
||||
throw new errors.InvalidOfferDuration({
|
||||
|
Loading…
Reference in New Issue
Block a user