Browse Source

fix: Unable to update station settings

Owen Diffey 2 years ago
parent
commit
b908b0cf41
1 changed files with 3 additions and 2 deletions
  1. 3 2
      backend/logic/actions/stations.js

+ 3 - 2
backend/logic/actions/stations.js

@@ -1395,9 +1395,10 @@ export default {
 						.catch(next);
 				},
 
-				async () => {
+				next => {
 					if (newStation.requests.autorequestLimit > newStation.requests.limit)
-						throw new Error("The autorequest limit cannot be higher than the request limit.");
+						next("The autorequest limit cannot be higher than the request limit.");
+					else next();
 				},
 
 				next => {