喇叭配置启用

This commit is contained in:
曹前明 2022-06-30 09:23:26 +08:00
parent 86856d04f0
commit 389f6336df
2 changed files with 5 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class Event(CommonBModel):
"""
事件
"""
cate = models.ForeignKey(EventCate, verbose_name='事件种类', on_delete=models.CASCADE)
cates = models.ForeignKey(EventCate, verbose_name='事件种类', on_delete=models.CASCADE)
imgs = models.ManyToManyField(File, verbose_name='事件图片', blank=True)
area = models.ForeignKey(Area, verbose_name='发生区域', on_delete=models.CASCADE)
location = models.JSONField('事件点位坐标', default=dict, null=False, blank=True)
@ -71,6 +71,9 @@ class Event(CommonBModel):
is_pushed = models.BooleanField('是否已推送', default=False)
# class
class Remind(BaseModel):
"""
事件提醒表

View File

@ -69,7 +69,7 @@ class SpClient:
def request(self, url: str, method: str, params=dict(), json=dict(), timeout=10,
file_path_rela=None, raise_exception=True):
if self is None:
if not settings.SP_ENABLED:
raise ParseError('音响对接未启用')
if self.isGetingToken:
req_num = 0