edit regex so names containing - are allowed

This commit is contained in:
Jan-Pieter Baert 2019-06-02 00:19:06 +02:00 committed by GitHub
parent 6913931d4f
commit f60e6a545e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ class Quote(db.Model):
default=datetime.utcnow
)
QUOTEE_REGEX = re.compile('\W*(\w+).*')
QUOTEE_REGEX = re.compile('\W*([a-zA-Z\-_0-9]+).*')
def __repr__(self):
return "<Quote {} \"{}\">".format(self.quoter, self.quote)