summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
Diffstat (limited to 'devel')
-rw-r--r--devel/management/commands/reporead.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 7c46800..544c4ec 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -137,6 +137,10 @@ def find_user(userstring):
# one of the two name fields.
name_q = Q()
for token in name.split():
+ # ignore quoted parts; e.g. nicknames in strings
+ if re.match(r'^[\'"].*[\'"]$', token):
+ print "token match:", token
+ continue
name_q &= (Q(first_name__icontains=token) |
Q(last_name__icontains=token))
return User.objects.get(name_q)