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

set() function doesn't work without specifying $teamId if Teams is disabled #69

Closed
alexvlrt opened this issue Oct 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@alexvlrt
Copy link

Laravel Settings

v3.4.0

Laravel Version

v10.48.12

Bug description

Having Teams feature disabled, when using Setting::set() without specifying the $teamId parameter is resulting in Column not found: 1054 Unknown column 'team_id' in 'where clause' error

From what I see, the set function of the Setting model is defaulting the $teamId parameter to null, while in the condition inside the function is checking with !== false

image

Steps to reproduce

  • Install de package
  • Publish config and migrations
  • Migrate
  • Try to set a parameter with Setting::set('key', $value)

Relevant log output

No response

@alexvlrt alexvlrt added the bug Something isn't working label Oct 21, 2024
@alexvlrt
Copy link
Author

My bad, seems that I was calling the model directly, and not the facade
It was one letter difference between Setting model and Settings facade

Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant