Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Fixed client guid check issue that caused 'project name exists error'…
Browse files Browse the repository at this point in the history
… (lib), closes #2368
  • Loading branch information
IndrekV committed Jan 26, 2018
1 parent 61021a5 commit 0baa4f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3552,9 +3552,11 @@ Project *Context::CreateProject(
it != user_->related.Projects.end(); it++) {
Project *p = *it;

auto clientIsSame = client_guid == p->ClientGUID();
bool clientIsSame = false;
if (client_id != 0 && p->CID() != 0) {
clientIsSame = clientIsSame || client_id == p->CID();
} else if (!client_guid.empty() && !p->ClientGUID().empty()) {
clientIsSame = client_guid == p->ClientGUID();
}

if (clientIsSame && p->Name() == trimmed_project_name) {
Expand Down

0 comments on commit 0baa4f3

Please sign in to comment.