refactor owrx.form -> owrx.form.input

This commit is contained in:
Jakob Ketterl
2021-04-29 15:17:21 +02:00
parent bc193c834c
commit 35dcff90ea
28 changed files with 49 additions and 48 deletions

View File

@@ -0,0 +1,10 @@
from owrx.form.input.converter import Converter
class ReceiverKeysConverter(Converter):
def convert_to_form(self, value):
return "" if value is None else "\n".join(value)
def convert_from_form(self, value):
# \r\n or \n? this should work with both.
return [v.strip("\r ") for v in value.split("\n")]