Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #2181

Closed
Open
Created Dec 05, 2012 by Administrator@rootOwner

PostgreSQL complains on noteable_id error at /merge_request/:id

Created by: yangchenyun

When I tried to open merge requests at repo/merge_requests/5, server raise the following error: I think it is related to issue #554.

(this lines)[https://github.com/gitlabhq/gitlabhq/blob/master/app/roles/votes.rb#L1-5] is the origin to request notes model, how could I fix it?

ActionView::Template::Error (PG::Error: ERROR:  operator does not exist: character varying = integer
LINE 1: ...otes".* FROM "notes"  WHERE "notes"."noteable_id" = 5 AND "n...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT "notes".* FROM "notes"  WHERE "notes"."noteable_id" = 5 AND "notes"."noteable_type" = 'MergeRequest'):
    1: .votes.votes-block
    2:   .progress
    3:     .bar.bar-success{style: "width: #{votable.upvotes_in_percent}%;"}
    4:     .bar.bar-danger{style: "width: #{votable.downvotes_in_percent}%;"}
    5:   .upvotes= "#{votable.upvotes} up"
    6:   .downvotes= "#{votable.downvotes} down"
  app/roles/votes.rb:4:in `upvotes'
  app/roles/votes.rb:30:in `votes_count'
  app/roles/votes.rb:8:in `upvotes_in_percent'
  app/views/votes/_votes_block.html.haml:3:in `_app_views_votes__votes_block_html_haml__3633581144532110098_38389700'
  app/views/merge_requests/show/_mr_title.html.haml:32:in `_app_views_merge_requests_show__mr_title_html_haml__525737155324710170_39287480'
  app/views/merge_requests/_show.html.haml:1:in `_app_views_merge_requests__show_html_haml__3523629932753325930_36729980'
  app/views/merge_requests/show.html.haml:1:in `_app_views_merge_requests_show_html_haml___2154110565297959768_38938600'
  app/controllers/merge_requests_controller.rb:24:in `show'
Assignee
Assign to
Time tracking