mirror of
https://github.com/pyrohost/pyrodactyl.git
synced 2026-04-05 19:51:59 +02:00
fix: bug where you couldn't delete allocations if no limit was set
This commit is contained in:
@@ -121,7 +121,7 @@ class NetworkAllocationController extends ClientApiController
|
||||
{
|
||||
// Don't allow the deletion of allocations if the server does not have an
|
||||
// allocation limit set.
|
||||
if (empty($server->allocation_limit)) {
|
||||
if ($server->allocation_limit === 0) {
|
||||
throw new DisplayException('You cannot delete allocations for this server: no allocation limit is set.');
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ class NetworkAllocationController extends ClientApiController
|
||||
{
|
||||
// Don't allow the deletion of allocations if the server does not have an
|
||||
// allocation limit set.
|
||||
if (empty($server->allocation_limit)) {
|
||||
if ($server->allocation_limit === 0) {
|
||||
throw new DisplayException('You cannot delete allocations for this server: no allocation limit is set.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user