mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Stripping whitespace from posted channel names
This commit is contained in:
parent
f76ff8703d
commit
d26ddd2ee0
1 changed files with 4 additions and 1 deletions
|
|
@ -49,7 +49,10 @@ def channel_post(_: Request, body: schema.ChannelPostRequest):
|
|||
if not body.directory.is_dir() and body.mkdir:
|
||||
make_media_directory(body.directory)
|
||||
|
||||
channel = lib.create_channel(body.__dict__) # TODO don't use the dataclass as a dict.
|
||||
bd_edit = body.__dict__
|
||||
bd_edit['name'] = bd_edit['name'].strip()
|
||||
channel = lib.create_channel(bd_edit) # TODO don't use the dataclass as a dict.
|
||||
print(channel)
|
||||
|
||||
# Refresh the videos asynchronously
|
||||
from ..api import refresh_videos
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue