Mercurial > p > roundup > code
diff roundup/admin.py @ 8541:7a7f6ee0a09e
bug: import/importables fail to set newid correctly.
Looks like I broke import when I was fixing a scandir
issue. Overindented a couple of lines. This prevented the next used id
from being set properly.
It also resulted in wierd output when importing (bunches of newlines).
Also fixed the two export/import tests to verify the new nextid for
all the classes is equal or higher than the old one. Ideally they
should be equal, but there is a bug somewhere where we get a double
increment in the export/import cycle dropping a number or two.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 23 Mar 2026 22:22:24 -0400 |
| parents | e8d1da6e3571 |
| children | f80c566f5726 |
line wrap: on
line diff
--- a/roundup/admin.py Mon Mar 23 13:18:41 2026 -0400 +++ b/roundup/admin.py Mon Mar 23 22:22:24 2026 -0400 @@ -1317,6 +1317,7 @@ file_props = None # loop through the file and create a node for each entry for n, r in enumerate(reader): + # read the file header if file_props is None: file_props = r continue @@ -1330,10 +1331,11 @@ nodeid = hyperdb_class.import_list(file_props, r) if hasattr(hyperdb_class, 'import_files') and import_files: hyperdb_class.import_files(import_dir, nodeid) - maxid = max(maxid, int(nodeid)) + + maxid = max(maxid, int(nodeid)) - # (print to sys.stdout here to allow tests to squash it .. ugh) - print(file=sys.stdout) + # (print to sys.stdout here to allow tests to squash it .. ugh) + print(file=sys.stdout) return maxid
