From 11b7914d37ce758b0c752cc404d61c61e626fd60 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Sat, 29 Jul 2023 15:37:52 +0300 Subject: [PATCH] Update RunServer.ps1 --- rsconcept/RunServer.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rsconcept/RunServer.ps1 b/rsconcept/RunServer.ps1 index 99c6f476..0b6c3be8 100644 --- a/rsconcept/RunServer.ps1 +++ b/rsconcept/RunServer.ps1 @@ -35,8 +35,11 @@ function RunFrontend() { } function FlushData { - & $pyExec $djangoSrc flush --no-input - Remove-Item $PSScriptRoot\backend\db.sqlite3 + & $pyExec $djangoSrc flush --no-input\ + $dbPath = "$PSScriptRoot\backend\db.sqlite3" + if (Test-Path -Path $dbPath -PathType Leaf) { + Remove-Item $dbPath + } } function AddAdmin {