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

Add record to nonexistent Fungarium #2546

Open
JoeCohen opened this issue Nov 23, 2024 · 1 comment
Open

Add record to nonexistent Fungarium #2546

JoeCohen opened this issue Nov 23, 2024 · 1 comment
Labels
bug Error Throws an Error

Comments

@JoeCohen
Copy link
Member

JoeCohen commented Nov 23, 2024

MO throws an error when a user tries to add a Fungarium Record to a nonexistent Fungarium.

To replicate:

  • View any Observation
  • Add Fungarium Record, filling in Name with a non-existent herbarium, e.g. "University of Mars"
  • Add

Result:

  • on webserver
    We're sorry, but something went wrong.
    If you are the application owner check the logs for more information.
  • log
    INFO -- : Started POST "/herbarium_records?observation_id=566836&q=1oaSB" for 204.195.31.134 at 2024-11-23 15:16:23 +0000
    INFO -- : Processing by HerbariumRecordsController#create as TURBO_STREAM
    INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "herbarium_record"=>{"herbarium_name"=>"University of Southeast Mars", "herbarium_id"=>"", "initial_det"=>"Mycena", "accession_number"=>"MO 566836", "notes"=>""}, "commit"=>"Add", "observation_id"=>"566836", "q"=>"1oaSB"}
    WARN -- : user=4468 robot=N ip=204.195.31.134
    INFO -- : Completed 500 Internal Server Error in 147ms (Views: 6.3ms | ActiveRecord: 125.5ms | Allocations: 8402)
    E, [2024-11-23T15:16:24.051771 #3676243] ERROR -- :
    ActiveRecord::NotNullViolation (Trilogy::ProtocolError: 1364: Field 'herbarium_id' doesn't have a default value (trilogy_query_recv)):
  • Local:
    ActiveRecord::NotNullViolation in HerbariumRecordsController#create
    Trilogy::ProtocolError: 1364: Field 'herbarium_id' doesn't have a default value (trilogy_query_recv)
    Rails.root: /Users/joe/mushroom-observer
    Application Trace | Framework Trace | Full Trace
    Exception Causes
    Trilogy::ProtocolError: 1364: Field 'herbarium_id' doesn't have a default value (trilogy_query_recv)
    Request
    Parameters:
    {"utf8"=>"✓",
    "authenticity_token"=>"[FILTERED]",
    "herbarium_record"=>{"herbarium_name"=>"University of Mars", "herbarium_id"=>"", "initial_det"=>"Suillus lakei", "accession_number"=>"MO 566837", "notes"=>""},
    "commit"=>"Add",
    "observation_id"=>"566837",
    "q"=>"1wsJu"}
@JoeCohen JoeCohen added bug Error Throws an Error labels Nov 23, 2024
@JoeCohen JoeCohen changed the title Add record to nonexistent Fungariam Add record to nonexistent Fungarium Nov 23, 2024
@JoeCohen
Copy link
Member Author

This is over my head for the moment.

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

No branches or pull requests

1 participant