Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add or edit an entry doesn't work #108

Closed
carlosfaria94 opened this issue Mar 30, 2016 · 10 comments
Closed

Add or edit an entry doesn't work #108

carlosfaria94 opened this issue Mar 30, 2016 · 10 comments

Comments

@carlosfaria94
Copy link

Hi,

I'm having a strange behavior. I'm using PostgresSQL and Node 4.4 and simply trying to add or edit an entry. And it's returned a successful message: "Success: The record have been saved." but nothing it's added or edited in database.
With -l flag it's returned a insert that I copy and directly execute in database, and voila, I finally successful insert the entry with SQL returned by the log.

So, what may be happening?

Thanks!

@simov
Copy link
Owner

simov commented Mar 30, 2016

If the record isn't saved for some reason you should receive back some error message from the database.

@carlosfaria94
Copy link
Author

But in the fact I’m not receiving back the error message. Maybe the user hasn't a full permission? But he is the owner of the database..

It’s a really weird behavior.

No dia 30/03/2016, às 07:59, simo notifications@github.com escreveu:

If the record isn't saved for some reason you should receive back some error message from the database.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #108 (comment)

@simov
Copy link
Owner

simov commented Mar 30, 2016

You can try the examples first. They should be working, so you can compare your configuration with the one found in the examples.

@carlosfaria94
Copy link
Author

Ok.. I try the example, and I obtain the same behavior that I had..
For example, it's returned a successful message: "Success: The record have been saved." and log: tbl insert into "public"."item" ("name","description","image") values ('Test','test','test') returning "id" ;, but nothing its aded.

So, I go to database and execute above sql and works now: http://i.imgur.com/YbcP0V5.png

I'm using PostgreSQL 9.4

@simov
Copy link
Owner

simov commented Mar 30, 2016

What flags do you pass to the admin? Copy/paste the command that you are using here.

@carlosfaria94
Copy link
Author

admin -v -l config/pg/

@simov
Copy link
Owner

simov commented Mar 30, 2016

Remove -v and try again
On Mar 30, 2016 6:09 PM, "Carlos Faria" notifications@github.com wrote:

admin -v -l config/pg/


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@carlosfaria94
Copy link
Author

It's working! Why -v flag interferes?

Thanks!

@simov
Copy link
Owner

simov commented Mar 30, 2016

That's stated in the docs:

The -v flag that you're passing to the Express Admin app means that you are running the admin in development mode. In this mode the authentication and the database record updates are disabled.

Though almost at the bottom :)

@carlosfaria94
Copy link
Author

Ups. Sry, I haven't read the last sentence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants