diff --git a/pgadmin/dlg/dlgRole.cpp b/pgadmin/dlg/dlgRole.cpp index 059e979..2e62ec8 100644 --- a/pgadmin/dlg/dlgRole.cpp +++ b/pgadmin/dlg/dlgRole.cpp @@ -215,6 +215,11 @@ int dlgRole::Go(bool modal) datValidUntil->SetValue(role->GetAccountExpires().GetDateOnly()); timValidUntil->SetTime(role->GetAccountExpires()); } + else + { + wxDateTime empty; + datValidUntil->SetValue(empty); + } txtConnectionLimit->SetValue(NumToStr(role->GetConnectionLimit())); txtComment->SetValue(role->GetComment()); @@ -654,8 +659,6 @@ wxString dlgRole::GetSql() { if (datValidUntil->GetValue().IsValid()) options += wxT("\n VALID UNTIL ") + qtDbString(DateToAnsiStr(datValidUntil->GetValue() + timValidUntil->GetValue())); - else - options += wxT("\n VALID UNTIL 'infinity'"); } if (txtConnectionLimit->GetValue().Length() == 0) @@ -774,8 +777,6 @@ wxString dlgRole::GetSql() } if (datValidUntil->GetValue().IsValid()) sql += wxT("\n VALID UNTIL ") + qtDbString(DateToAnsiStr(datValidUntil->GetValue() + timValidUntil->GetValue())); - else - sql += wxT("\n VALID UNTIL 'infinity'"); if (txtConnectionLimit->GetValue().Length() > 0) {