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 5
5
<name >Time Tracker</name >
6
6
<summary >Time Tracker App</summary >
7
7
<description ><![CDATA[ Time Tracker App]]> </description >
8
- <version >0.0.15 </version >
8
+ <version >0.0.16 </version >
9
9
<licence >agpl</licence >
10
10
<
author mail =
" [email protected] " >MTier Ltd.</
author >
11
11
<namespace >TimeTracker</namespace >
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ public function editClient($id) {
306
306
}
307
307
if (trim ($ name ) != '' ){
308
308
$ old = $ this ->clientMapper ->findByName ($ name );
309
- if ($ old == null ){
309
+ if ($ old == null || $ old -> id == $ id ){
310
310
$ c ->setName ($ name );
311
311
$ this ->clientMapper ->update ($ c );
312
312
} else {
@@ -396,7 +396,7 @@ public function editProject($id) {
396
396
$ name = $ this ->request ->name ;
397
397
if (trim ($ name ) != '' ){
398
398
$ old = $ this ->projectMapper ->findByName ($ name );
399
- if ($ old != null ){
399
+ if ($ old != null && $ old -> id != $ id ){
400
400
return new JSONResponse (["Error " => "A project with this name already exists " ]);
401
401
}
402
402
$ p ->setName ($ name );
@@ -542,7 +542,7 @@ public function editTag($id) {
542
542
return ;
543
543
}
544
544
$ old = $ this ->tagMapper ->findByNameUser ($ name , $ this ->userId );
545
- if ($ old != null ){
545
+ if ($ old != null && $ old -> id != $ id ){
546
546
return new JSONResponse (["Error " => "This tag name already exists " ]);
547
547
}
548
548
$ c ->setName ($ name );
You can’t perform that action at this time.
0 commit comments