mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
bug fix
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4596 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
4a224e6c04
commit
abc21c5fe4
@ -390,6 +390,18 @@ pgendCopyTransactionToEngine (PGBackend *be, const GUID *trans_guid)
|
|||||||
i, nrows, ncols);
|
i, nrows, ncols);
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
|
if (0 == nrows)
|
||||||
|
{
|
||||||
|
PQclear (result);
|
||||||
|
/* I beleive its a programming error to get this case.
|
||||||
|
* Print a warning for now... */
|
||||||
|
PERR ("no such transaction in the database. This is unexpected ...\n");
|
||||||
|
xaccBackendSetError (&be->be, ERR_SQL_MISSING_DATA);
|
||||||
|
pgendEnable(be);
|
||||||
|
gnc_engine_resume_events();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (1 < nrows)
|
if (1 < nrows)
|
||||||
{
|
{
|
||||||
/* since the guid is primary key, this error is totally
|
/* since the guid is primary key, this error is totally
|
||||||
@ -458,17 +470,6 @@ pgendCopyTransactionToEngine (PGBackend *be, const GUID *trans_guid)
|
|||||||
i++;
|
i++;
|
||||||
} while (result);
|
} while (result);
|
||||||
|
|
||||||
if (0 == nrows)
|
|
||||||
{
|
|
||||||
/* hack alert -- not sure how to handle this case; we'll just
|
|
||||||
* punt for now ... */
|
|
||||||
PERR ("no such transaction in the database. This is unexpected ...\n");
|
|
||||||
xaccBackendSetError (&be->be, ERR_SQL_MISSING_DATA);
|
|
||||||
pgendEnable(be);
|
|
||||||
gnc_engine_resume_events();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if engine data was newer, we are done */
|
/* if engine data was newer, we are done */
|
||||||
if (0 <= engine_data_is_newer)
|
if (0 <= engine_data_is_newer)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user