Создаю файл на всякий случай
This commit is contained in:
parent
c999510321
commit
1bfbea8f0b
@ -435,9 +435,11 @@ def alarm_play(request):
|
||||
path_alarm = Settings.objects.filter(name="alarm").first()
|
||||
path_outgoing = Settings.objects.filter(name="outgoing").first()
|
||||
file_src = settings.MEDIA_ROOT + str(alarm.audio_file)
|
||||
os.makedirs(path_alarm.value, exist_ok=True)
|
||||
shutil.copy(file_src, path_alarm.value + "/1.mp3")
|
||||
|
||||
notifier_list = Notifier.objects.order_by("pla_groups", "name").all()
|
||||
os.makedirs(path_outgoing.value, exist_ok=True)
|
||||
for notifier in notifier_list:
|
||||
file = open(path_outgoing.value + "/" + notifier.sip_number, "a")
|
||||
my_file = File(file)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user