[PR #1370] [MERGED] fix: made rules optional #1697

Closed
opened 2026-02-26 03:31:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/1370
Author: @allentje
Created: 10/20/2021
Status: Merged
Merged: 10/25/2021
Merged by: @phanan

Base: masterHead: fix-standard-playlist-creation


📝 Commits (5)

  • 7c3a258 Made rules optional
  • 8e44066 Update tests/Integration/Services/PlaylistServiceTest.php
  • 474fe9e Update tests/Integration/Services/PlaylistServiceTest.php
  • 8166a57 Update tests/Integration/Services/PlaylistServiceTest.php
  • 690de8d Update tests/Integration/Services/PlaylistServiceTest.php

📊 Changes

2 files changed (+47 additions, -1 deletions)

View changed files

📝 app/Services/PlaylistService.php (+1 -1)
tests/Integration/Services/PlaylistServiceTest.php (+46 -0)

📄 Description

What does this PR do?

fixes #1371
The standard playlist can no longer be created as rules (Smart playlists) are sent with a null however the PlaylistService requires that an array is passed.
This PR allows for rules to be optional so that the standard playlists can be created.

Due to the fact that rules are optional and dictate the difference between a regular playlist and smart playlist I have decided to let the rules argument accept a null value.

Where should the reviewer start?

Before checking out this PR try to create a new playlist. The ajax request should return a 500 with a stacktrace.
After checking out the playlists should now successfully be created without any issues.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/koel/koel/pull/1370 **Author:** [@allentje](https://github.com/allentje) **Created:** 10/20/2021 **Status:** ✅ Merged **Merged:** 10/25/2021 **Merged by:** [@phanan](https://github.com/phanan) **Base:** `master` ← **Head:** `fix-standard-playlist-creation` --- ### 📝 Commits (5) - [`7c3a258`](https://github.com/koel/koel/commit/7c3a258191f603be0bf5fdb03fc971f7fd6e0b21) Made rules optional - [`8e44066`](https://github.com/koel/koel/commit/8e44066041d14999983897ec8e373e070827fd8f) Update tests/Integration/Services/PlaylistServiceTest.php - [`474fe9e`](https://github.com/koel/koel/commit/474fe9e25dd29788a5d75085a3b649db2a236481) Update tests/Integration/Services/PlaylistServiceTest.php - [`8166a57`](https://github.com/koel/koel/commit/8166a578c1c50cb66aae152353dc54848b397e1c) Update tests/Integration/Services/PlaylistServiceTest.php - [`690de8d`](https://github.com/koel/koel/commit/690de8d06c85f069ef02d92f6b7f5dd62ed85dd1) Update tests/Integration/Services/PlaylistServiceTest.php ### 📊 Changes **2 files changed** (+47 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/Services/PlaylistService.php` (+1 -1) ➕ `tests/Integration/Services/PlaylistServiceTest.php` (+46 -0) </details> ### 📄 Description #### What does this PR do? fixes #1371 The standard playlist can no longer be created as rules (Smart playlists) are sent with a null however the `PlaylistService` requires that an array is passed. This PR allows for rules to be optional so that the standard playlists can be created. Due to the fact that rules are optional and dictate the difference between a regular playlist and smart playlist I have decided to let the rules argument accept a `null` value. #### Where should the reviewer start? Before checking out this PR try to create a new playlist. The ajax request should return a 500 with a stacktrace. After checking out the playlists should now successfully be created without any issues. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 03:31:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#1697
No description provided.