fixed redirect

pull/1/head
usama.jameel 2025-01-06 11:15:23 +05:00
parent d8777f63b0
commit 759f688264
1 changed files with 2 additions and 3 deletions

View File

@ -61,12 +61,11 @@ public class CuttingController {
@RequestParam( value = "site-id", required = false ) String siteId,
@RequestParam( value = "count", required = false ) Long count,
Model model ){
model.addAttribute("accounts", inventoryAccountService.getInventoryAccounts( id, title, active, createdBy, startDate, endDate, siteId, count , "PROCESS", "1", false) );
model.addAttribute("locations", locationService.findAll() );
if(StringUtils.isNullOrEmpty( active )){
return "redirect:/cutting/inventory-accounts?id=&title=&active=1&created-by=&start-date=&end-date=&site-id=&site-title=&count=100";
}
model.addAttribute("accounts", inventoryAccountService.getInventoryAccounts( id, title, active, createdBy, startDate, endDate, siteId, count , "PROCESS", "1", false) );
model.addAttribute("locations", locationService.findAll() );
return "/cutting/inventory-accounts";
}