Fixed bug in how DomainBlock defaults
handle reject_media, reject_reports.
This commit is contained in:
parent
7a31c3380e
commit
6d4e18bbf6
|
@ -127,13 +127,15 @@ class DomainBlock(object):
|
||||||
"""Initialize the DomainBlock
|
"""Initialize the DomainBlock
|
||||||
"""
|
"""
|
||||||
self.domain = domain
|
self.domain = domain
|
||||||
|
# Set severity first so if reject_media or reject_reports = False
|
||||||
|
# that overrides the default of True for severity = 'suspend'
|
||||||
|
self.severity = severity
|
||||||
self.public_comment = public_comment
|
self.public_comment = public_comment
|
||||||
self.private_comment = private_comment
|
self.private_comment = private_comment
|
||||||
self.reject_media = reject_media
|
self.reject_media = reject_media
|
||||||
self.reject_reports = reject_reports
|
self.reject_reports = reject_reports
|
||||||
self.obfuscate = obfuscate
|
self.obfuscate = obfuscate
|
||||||
self.id = id
|
self.id = id
|
||||||
self.severity = severity
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def severity(self):
|
def severity(self):
|
||||||
|
@ -147,6 +149,7 @@ class DomainBlock(object):
|
||||||
self._severity = BlockSeverity(sev)
|
self._severity = BlockSeverity(sev)
|
||||||
|
|
||||||
# Suspend implies reject_media,reject_reports == True
|
# Suspend implies reject_media,reject_reports == True
|
||||||
|
log.debug('Suspend blocks media and reports')
|
||||||
if self._severity.level == SeverityLevel.SUSPEND:
|
if self._severity.level == SeverityLevel.SUSPEND:
|
||||||
self.reject_media = True
|
self.reject_media = True
|
||||||
self.reject_reports = True
|
self.reject_reports = True
|
||||||
|
|
Loading…
Reference in New Issue