@@ -42,16 +42,18 @@ const Page = () => {
4242 const { templateId } = router . query ;
4343 const settings = useSettings ( ) ;
4444 const removeDialog = useDialog ( ) ;
45+ // Prioritize URL query parameter, then fall back to settings
46+ const currentTenant = router . query . tenantFilter || settings . currentTenant ;
4547
4648 // API call to get backup files
4749 const backupList = ApiGetCall ( {
4850 url : "/api/ExecListBackup" ,
4951 data : {
50- tenantFilter : settings . currentTenant ,
52+ tenantFilter : currentTenant ,
5153 Type : "Scheduled" ,
5254 NameOnly : true ,
5355 } ,
54- queryKey : `BackupList-${ settings . currentTenant } ` ,
56+ queryKey : `BackupList-${ currentTenant } ` ,
5557 } ) ;
5658
5759 // API call to get existing backup configuration/schedule
@@ -61,7 +63,7 @@ const Page = () => {
6163 showHidden : true ,
6264 Type : "New-CIPPBackup" ,
6365 } ,
64- queryKey : `BackupTasks-${ settings . currentTenant } ` ,
66+ queryKey : `BackupTasks-${ currentTenant } ` ,
6567 } ) ;
6668
6769 // Use the actual backup files as the backup data
@@ -380,7 +382,10 @@ const Page = () => {
380382 confirmText :
381383 "Are you sure you want to remove this backup schedule? This will stop automatic backups but won't delete existing backup files." ,
382384 } }
383- relatedQueryKeys = { [ `BackupTasks-${ settings . currentTenant } ` , `BackupList-${ settings . currentTenant } ` ] }
385+ relatedQueryKeys = { [
386+ `BackupTasks-${ settings . currentTenant } ` ,
387+ `BackupList-${ settings . currentTenant } ` ,
388+ ] }
384389 onSuccess = { ( ) => {
385390 // Refresh both queries when a backup schedule is removed
386391 setTimeout ( ( ) => {
0 commit comments