Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP address search is broken (again) #2849

Closed
Type-kun opened this issue Jan 19, 2017 · 3 comments
Closed

IP address search is broken (again) #2849

Type-kun opened this issue Jan 19, 2017 · 3 comments
Labels

Comments

@Type-kun
Copy link
Collaborator

PG::UndefinedColumn exception raised

ERROR: column pool_versions.updater does not exist LINE 1: ...rsions_updater_ip_addr FROM "pool_versions" WHERE "pool_vers... ^
app/logical/moderator/ip_addr_search.rb:53:in search_by_user_id' app/logical/moderator/ip_addr_search.rb:43:in search_by_user_name'
app/logical/moderator/ip_addr_search.rb:13:in execute' app/controllers/moderator/ip_addrs_controller.rb:7:in index'

I strongly suspect the reason for this is missing belongs_to :updater, :class_name => "User" in Pool Archive model, since line 53 mentioned above says PoolArchive.where(updater: users)

@Type-kun Type-kun added the Bug label Jan 19, 2017
Type-kun added a commit that referenced this issue Jan 19, 2017
@Type-kun
Copy link
Collaborator Author

With this, PoolArchive.where(updater: users).to_sql returns something sensible in rails console. Tests needed though. @r888888888 deploy on testbooru please? Also probably need to enable pool history on testbooru.

@evazion
Copy link
Member

evazion commented Jan 19, 2017

My fault, didn't have archives set up so didn't actually test that line. Finally got it set up now though and yeah, the fix works.

http://devbooru.evazion.ml/moderator/ip_addrs?search[user_name]=albert

@r888888888
Copy link
Collaborator

I have it fixed in my post-archive branch, I will probably cherry-pick it in tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants