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

Creating a Container #164

Open
Cordir opened this issue Aug 21, 2017 · 3 comments
Open

Creating a Container #164

Cordir opened this issue Aug 21, 2017 · 3 comments

Comments

@Cordir
Copy link

Cordir commented Aug 21, 2017

Today, I attempted to create a container. It was takeable, reset closed.
The Workshop provided this bug:
`ActiveRecord::StatementInvalid in ObjsController#create
PG::InsufficientPrivilege: ERROR: permission denied for relation objs : INSERT INTO "objs" ("area_id", "cost", "created_at", "extra_flags", "keywords", "ldesc", "misc_flags", "object_type", "sdesc", "updated_at", "v0", "v1", "v2", "v3", "vnum", "wear_flags", "weight") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) RETURNING "id"

Extracted source (around line #92):
90
91
92
93
94
95

@obj.wear_flags ||= 0

if @obj.save
  @area.update(:last_updated_at => Time.now, :last_updated_by => current_user.id)
  redirect_to area_obj_path(@area, @obj), notice: 'Object was sucessfully created.'
else

Rails.root: /app

Application Trace | Framework Trace | Full Trace
app/controllers/objs_controller.rb:92:in `create'
Request

Parameters:

{"utf8"=>"✓",
"authenticity_token"=>"94PBT0HYKbMrSEypFOzGJrJ8pnyIaspFgEQEB0N8pGQ=",
"obj"=>{"vnum"=>"39",
"keywords"=>"rucksack",
"sdesc"=>"a stained and worn brown leather rucksack",
"ldesc"=>"One of the straps of this stained,
brown leather rucksack is partially torn.",
"object_type"=>"15",
"v0"=>"41",
"v1"=>"5",
"v2"=>"0",
"v3"=>"0",
"takeable"=>"1",
"glow"=>"0",
"hum"=>"0",
"evil"=>"0",
"invis"=>"0",
"magic"=>"0",
"nodrop"=>"0",
"anti_good"=>"0",
"anti_evil"=>"0",
"anti_neutral"=>"0",
"noremove"=>"0",
"inventory"=>"0",
"metallic"=>"0",
"good"=>"0",
"not_purgable"=>"0",
"flammable"=>"0",
"two_handed"=>"0",
"use_cost"=>"0",
"anti_unalign"=>"0",
"neutral"=>"0",
"no_hoard"=>"0",
"masked"=>"0",
"underwater_breath"=>"0",
"wear_flags"=>"16384",
"weight"=>"3",
"cost"=>"0"},
"obj_capacity"=>"38",
"ContainerKeyVnumRadioOptions"=>"3",
"commit"=>"Create Obj",
"area_id"=>"8"}
Toggle session dump
Toggle env dump
Response

Headers:

None`

@Cordir
Copy link
Author

Cordir commented Aug 21, 2017

Since it didn't like me creating one, I tried copying an existing container. That also generated a crash/bug/issue.

ActiveRecord::StatementInvalid in ObjsController#new
PG::InsufficientPrivilege: ERROR: permission denied for relation objs : INSERT INTO "objs" ("area_id", "cost", "created_at", "extra_flags", "keywords", "ldesc", "misc_flags", "object_type", "sdesc", "updated_at", "v0", "v1", "v2", "v3", "vnum", "wear_flags", "weight") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) RETURNING "id"

Extracted source (around line #29):
27
28
29
30
31
32

  new_obj = base_obj.dup
  new_obj.vnum = @area.nextobjvnum
  new_obj.save

  base_obj.oxdescs.each do |oxdesc|
    new_oxdesc = oxdesc.dup

Rails.root: /app

Application Trace | Framework Trace | Full Trace
app/controllers/objs_controller.rb:29:in `new'
Request

Parameters:

{"copy_obj"=>"4699",
"area_id"=>"8"}
Toggle session dump
Toggle env dump
Response

Headers:

None

@abagby
Copy link

abagby commented Aug 21, 2017 via email

@Cordir
Copy link
Author

Cordir commented Aug 21, 2017 via email

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

No branches or pull requests

2 participants