Skip to content

Commit

Permalink
Merge pull request #424 from mmd-osm/patch/cleanup19
Browse files Browse the repository at this point in the history
Small fixes/improvements
  • Loading branch information
mmd-osm authored Jul 14, 2024
2 parents 2bb72a5 + f9788e2 commit 812e5b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/process_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@ void process_request(request &req, rate_limiter &limiter,
case http::method::POST:
case http::method::PUT: {
validate_user_db_update_permission(req_ctx, *selection);
// data_selection based read only transaction no longer needed
selection.reset(nullptr);
default_transaction.reset(nullptr);

if (update_factory == nullptr)
throw http::bad_request("Backend does not support given HTTP method");
Expand Down
2 changes: 1 addition & 1 deletion test/staticxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ std::unique_ptr<database> parse_xml(const char *filename) {
xml_parser parser(db.get());
int status = xmlSAXUserParseFile(&handler, &parser, filename);
if (status != 0) {
xmlErrorPtr err = xmlGetLastError();
const auto err = xmlGetLastError();
throw std::runtime_error(
fmt::format("XML ERROR: {}.", err->message));
}
Expand Down

0 comments on commit 812e5b5

Please sign in to comment.