mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-23 22:08:11 -05:00
Change admin_override to sponsor_override since that's what the validator is actually checking
This commit is contained in:
@@ -316,7 +316,7 @@ class PromoteController(ListingController):
|
||||
future = 1,
|
||||
reference_date = promote.promo_datetime_now,
|
||||
business_days = False,
|
||||
admin_override = True),
|
||||
sponsor_override = True),
|
||||
sr = VSubmitSR('sr', promotion=True))
|
||||
def POST_add_roadblock(self, form, jquery, dates, sr):
|
||||
if (form.has_errors('startdate', errors.BAD_DATE,
|
||||
@@ -339,7 +339,7 @@ class PromoteController(ListingController):
|
||||
future = 1,
|
||||
reference_date = promote.promo_datetime_now,
|
||||
business_days = False,
|
||||
admin_override = True),
|
||||
sponsor_override = True),
|
||||
sr = VSubmitSR('sr', promotion=True))
|
||||
def POST_rm_roadblock(self, form, jquery, dates, sr):
|
||||
if dates and sr:
|
||||
@@ -353,7 +353,7 @@ class PromoteController(ListingController):
|
||||
future = 1,
|
||||
reference_date = promote.promo_datetime_now,
|
||||
business_days = False,
|
||||
admin_override = True),
|
||||
sponsor_override = True),
|
||||
l = VLink('link_id'),
|
||||
bid = VFloat('bid', min=0, max=g.max_promote_bid,
|
||||
coerce=False, error=errors.BAD_BID),
|
||||
|
||||
@@ -1618,7 +1618,7 @@ class VDate(Validator):
|
||||
|
||||
"""
|
||||
def __init__(self, param, future=None, past = None,
|
||||
admin_override = False,
|
||||
sponsor_override = False,
|
||||
reference_date = lambda : datetime.now(g.tz),
|
||||
business_days = False):
|
||||
self.future = future
|
||||
@@ -1630,8 +1630,8 @@ class VDate(Validator):
|
||||
# function for generating "now"
|
||||
self.reference_date = reference_date
|
||||
|
||||
# do we let admins override date range checking?
|
||||
self.override = admin_override
|
||||
# do we let admins and sponsors override date range checking?
|
||||
self.override = sponsor_override
|
||||
Validator.__init__(self, param)
|
||||
|
||||
def run(self, date):
|
||||
|
||||
Reference in New Issue
Block a user