mirror of
https://github.com/discourse/discourse-data-explorer.git
synced 2025-02-16 16:34:47 +00:00
Merge pull request #10 from schungx/patch-1
Avoid exception when object.user is nil
This commit is contained in:
commit
e77cf95a58
@ -49,8 +49,8 @@ after_initialize do
|
||||
def excerpt
|
||||
Post.excerpt(object.cooked, 70)
|
||||
end
|
||||
def username; object.user.username; end
|
||||
def avatar_template; object.user.avatar_template; end
|
||||
def username; object.user && object.user.username; end
|
||||
def avatar_template; object.user && object.user.avatar_template; end
|
||||
end
|
||||
|
||||
# Run a data explorer query on the currently connected database.
|
||||
|
Loading…
x
Reference in New Issue
Block a user