mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Fix item route responses
Also avoid storing empty strings in a nullable field.
This commit is contained in:
@ -32,7 +32,7 @@ object Ident {
|
||||
|
||||
def fromString(s: String): Either[String, Ident] =
|
||||
if (s.forall(chars.contains)) Right(new Ident(s))
|
||||
else Left(s"Invalid identifier: $s. Allowed chars: ${chars.mkString}")
|
||||
else Left(s"Invalid identifier: '$s'. Allowed chars: ${chars.toList.sorted.mkString}")
|
||||
|
||||
def fromBytes(bytes: ByteVector): Ident =
|
||||
unsafe(bytes.toBase58)
|
||||
|
Reference in New Issue
Block a user