File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 55 <name >Time Tracker</name >
66 <summary >Time Tracker App</summary >
77 <description ><![CDATA[ Time Tracker App]]> </description >
8- <version >0.0.15 </version >
8+ <version >0.0.16 </version >
99 <licence >agpl</licence >
1010 <
author mail =
" [email protected] " >MTier Ltd.</
author >
1111 <namespace >TimeTracker</namespace >
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ public function editClient($id) {
306306 }
307307 if (trim ($ name ) != '' ){
308308 $ old = $ this ->clientMapper ->findByName ($ name );
309- if ($ old == null ){
309+ if ($ old == null || $ old -> id == $ id ){
310310 $ c ->setName ($ name );
311311 $ this ->clientMapper ->update ($ c );
312312 } else {
@@ -396,7 +396,7 @@ public function editProject($id) {
396396 $ name = $ this ->request ->name ;
397397 if (trim ($ name ) != '' ){
398398 $ old = $ this ->projectMapper ->findByName ($ name );
399- if ($ old != null ){
399+ if ($ old != null && $ old -> id != $ id ){
400400 return new JSONResponse (["Error " => "A project with this name already exists " ]);
401401 }
402402 $ p ->setName ($ name );
@@ -542,7 +542,7 @@ public function editTag($id) {
542542 return ;
543543 }
544544 $ old = $ this ->tagMapper ->findByNameUser ($ name , $ this ->userId );
545- if ($ old != null ){
545+ if ($ old != null && $ old -> id != $ id ){
546546 return new JSONResponse (["Error " => "This tag name already exists " ]);
547547 }
548548 $ c ->setName ($ name );
You can’t perform that action at this time.
0 commit comments