From: | Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: PATCH: To fix the issue in constraints node (pgAdmin4) |
Date: | 2016-10-31 13:31:45 |
Message-ID: | CAKKotZRnxVHB6Gi84gY0+PUpr_MCt52ZBO0VOJrgGmQPy4hvjg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi,
I have fixed the refresh on exclusion_constraint node issue but for
displaying icon in grid I need to check with Akshay because the
appendGridToPanel model( in depends.js) is set node type as 'exclude'
instead of 'exclusion_constraint', I am not able to find root cause of this
behaviour.
I will send separate patch for displaying icon in grid meanwhile please
review updated patch.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Fri, Oct 28, 2016 at 9:04 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> Hi
>
> On Fri, Oct 28, 2016 at 1:15 PM, Murtuza Zabuawala
> <murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
> > Hi,
> >
> > PFA patch to fix the issue in exclusion constrains where it was throwing
> > error when user clicks on dependencies tab.
> > RM#1892
> >
> > I have found & also fixed the same issue in Index constrains in this
> patch.
>
> I'm getting weird results with this patch. When I first applied it, it
> displayed the dependents and dependencies on the test exclusion
> constraint, but without an icon on the entry on the Depends panel. I
> see no entries for a primary key constraint though, and after
> selecting one, if I reselect the exclusion constraint, I then no
> longer see the dependencies/dependents listed. If I try to refresh the
> node, I get the following exception:
>
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/flask/app.py",
> line 2000, in __call__
> return self.wsgi_app(environ, start_response)
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/flask/app.py",
> line 1991, in wsgi_app
> try:
> try:
> response = self.full_dispatch_request()
> except Exception as e:
> error = e
> response = self.make_response(self.handle_exception(e))
> return response(environ, start_response)
> finally:
> if self.should_ignore_error(error):
> error = None
> ctx.auto_pop(error)
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/flask/app.py",
> line 1567, in handle_exception
> reraise(exc_type, exc_value, tb)
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/flask/app.py",
> line 1988, in wsgi_app
> response = self.full_dispatch_request()
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/flask/app.py",
> line 1641, in full_dispatch_request
> rv = self.handle_user_exception(e)
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/flask/app.py",
> line 1544, in handle_user_exception
> reraise(exc_type, exc_value, tb)
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/flask/app.py",
> line 1639, in full_dispatch_request
> rv = self.dispatch_request()
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/flask/app.py",
> line 1625, in dispatch_request
> return self.view_functions[rule.endpoint](**req.view_args)
> File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-
> packages/flask/views.py",
> line 84, in view
> return self.dispatch_request(*args, **kwargs)
> File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line
> 235, in dispatch_request
> return method(*args, **kwargs)
> File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/databases/schemas/tables/constraints/
> exclusion_constraint/__init__.py",
> line 248, in wrap
> return f(*args, **kwargs)
> File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/databases/schemas/tables/constraints/
> exclusion_constraint/__init__.py",
> line 415, in node
> if len(rset['rows']) == 0:
> TypeError: string indices must be integers
>
> Thanks.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
Attachment | Content-Type | Size |
---|---|---|
RM_1892_v1.patch | application/octet-stream | 8.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Akshay Joshi | 2016-11-01 07:07:10 | Re: [pgAdmin4][Patch]: RM 1729 Role privileges are badly displayed |
Previous Message | Dave Page | 2016-10-30 17:16:47 | Re: PATCH: To fix the issue in domain node (pgAdmin4) |