public inbox for [email protected]
help / color / mirror / Atom feedPATCH: To convert role expiry date format to ISO8601 (pgAdmin4)
2+ messages / 2 participants
[nested] [flat]
* PATCH: To convert role expiry date format to ISO8601 (pgAdmin4)
@ 2016-08-31 13:34 Murtuza Zabuawala <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Murtuza Zabuawala @ 2016-08-31 13:34 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
PFA minor patch to fix the issue of converting role expiry date format to
ISO8601
RM#1153
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] RM_1153.patch (1.4K, 3-RM_1153.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/roles/__init__.py b/web/pgadmin/browser/server_groups/servers/roles/__init__.py
index bee3d02..dbf0d71 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/roles/__init__.py
@@ -145,7 +145,7 @@ class RoleView(PGChildNodeView):
date = datetime.datetime.strptime(
data[u'rolvaliduntil'], '%m/%d/%Y'
)
- data[u'rolvaliduntil'] = date.strftime("%d-%B-%Y")
+ data[u'rolvaliduntil'] = date.strftime("%Y-%m-%d")
except Exception as e:
return precondition_required(
_("Date format is invalid.")
@@ -640,11 +640,8 @@ rolmembership:{
'admin': True if role.group(1) == '1' else False
})
row['rolmembership'] = res
- row['rolvaliduntil'] = row['rolvaliduntil'].isoformat() \
- if isinstance(
- row['rolvaliduntil'],
- (datetime.date, datetime.datetime)
- ) else None
+ if row['rolvaliduntil'] is not None:
+ row['rolvaliduntil'] = row['rolvaliduntil'].split(' ')[0]
if 'seclabels' in row and row['seclabels'] is not None:
res = []
for sec in row['seclabels']:
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PATCH: To convert role expiry date format to ISO8601 (pgAdmin4)
@ 2016-09-02 14:24 Dave Page <[email protected]>
parent: Murtuza Zabuawala <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Page @ 2016-09-02 14:24 UTC (permalink / raw)
To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers
Thanks, applied.
On Wed, Aug 31, 2016 at 2:34 PM, Murtuza Zabuawala
<[email protected]> wrote:
> Hi,
>
> PFA minor patch to fix the issue of converting role expiry date format to
> ISO8601
> RM#1153
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-09-02 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-08-31 13:34 PATCH: To convert role expiry date format to ISO8601 (pgAdmin4) Murtuza Zabuawala <[email protected]>
2016-09-02 14:24 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox