HZ-HBO-ICT / it-conference

Official repository for the IT-Conference
https://weareinittogether.nl
MIT License
5 stars 0 forks source link

Bug: "Attempt to read property "id" on null" in seeded data #421

Closed dwaard closed 1 month ago

dwaard commented 1 month ago

Describe the bug When seeding data for developer testing, there seem to be no company representative associated with a company. That leads to an error being generated when opening a company request page.

To Reproduce Steps to reproduce the behavior:

  1. Create a fresh development envrionment by php artisan migrate:fresh --seed
  2. Go to 'Admin' -> 'Companies'
  3. Click on One of the companies
  4. The error appears

Expected behavior The company show page should appear

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Note that this is just for the development, but it might have an impact on the migrations for the column that holds the FK to the company rep appears to be nullable.

dwaard commented 1 month ago

Nevermind, I fixed it already. It appeared to be a mistake in my code