When a authenticated user post a comments, the field's form is not populate with data of user
Reported by: |
jmad |
Owned by: |
jmad |
Component:
|
contrib.comments
|
Version:
|
dev
|
Severity:
|
|
Keywords:
|
|
Cc:
|
|
Triage Stage:
|
Accepted
|
Has patch:
|
yes
|
Needs documentation:
|
no
|
Needs tests:
|
no
|
Patch needs improvement:
|
no
|
Easy pickings:
|
|
UI/UX:
|
|
When a authenticated user post a comments, the field's form is not populate with full name and email of the user. This bug stems from the fact that the code is testing if "name" and "email" are present or not in "Data". If they are not present, then the code uses data from the user. Ors these two fields are always present in "data". It must test if they are empty or not and not if they are present.
This bug is in svn and beta 2 version.
The standard way to test if a dictionary key has non-empty content is
if data["name"]: ...
. The patch style looks more like C and makes the reader wonder why it's trying to do something special.