- 19 Jun, 2017 2 commits
-
-
Denis Laxalde authored
When this is clearly a client error, set status to 400. Otherwise, keep the default value for RemoteCallFailed (status=500).
-
Denis Laxalde authored
When we raise a RemoteCallFailed error (erroneously turned into a '500 Internal Server Error' response, but that's another business). In production environment, we do not want to log the exception in most cases where it's actually a client error. So only log the exception in debug mode.
-
- 28 Apr, 2017 1 commit
-
-
Philippe Pepiot authored
When filtering on a relation, find() was generating rql like 'Any X WHERE X is ETYPE, X relation EID' which work without being rewritten (it should probably not), but when applying some rewrite (eg. permissions) it raise in rqlrewrite code. def _use_orig_term(self, snippet_varname, term): ... > self.rewritten[key] = term.name E AttributeError: 'Constant' object has no attribute 'name' Generate valid rql instead 'Any X WHERE X is ETYPE, X relation Y, Y eid EID'.
-
- 26 Apr, 2017 1 commit
-
-
Philippe Pepiot authored
-
- 25 Apr, 2017 3 commits
-
-
Philippe Pepiot authored
For readability, avoid escaping using %% and use format() instead.
-
Philippe Pepiot authored
-
Philippe Pepiot authored
Display what attribute trigger the NotImplementedError
-
- 21 Apr, 2017 2 commits
-
-
Sylvain Thénault authored
actually not necessary.
-
Sylvain Thénault authored
-
- 25 Apr, 2017 1 commit
-
-
Sylvain Thénault authored
hard one!
-
- 20 Apr, 2017 1 commit
-
-
Sylvain Thénault authored
We actually want one only if this is not a (`And` / `Or`) binary tree of `Not` or `Exists` nodes, so write a recursive function to tell so. Related to #17074119
-
- 21 Apr, 2017 1 commit
-
-
Sylvain Thénault authored
When some inserted RQL snippet generate more solutions than the original RQL, the rewriter attempt to duplicate the snippet for each newly introduced solution. There are though some cases where we do not want this behaviour in case of ambiguities introduced by: * NOT(X relation Y) expression, since it won't be equivalent to NOT(X relation Y1, Y1 is Type1) OR NOT(X relation Y2, Y2 is Type2) ; * EXISTS(X relation Y, Y is IN (Type1, Type2) expression, since it's not actually necessary to split an explicitly introduced ambiguity (and it crash if we attempt to do so, so...). In test, we've to modify the `rewrite()` function because in the newly introduced test we need the same constraint to be applied to two variables in the original query, and this was not supported before. Notice the generated RQL in test is still *NOT CORRECT* "(EXISTS(NOT EXISTS() OR EXISTS(...))", or at least isn't optimal. This will be fixed in a forthcoming changeset. Related to #17074119
-
- 19 Apr, 2017 1 commit
-
-
Sylvain Thénault authored
By default after the import processed the importer indicates which external entities can't be inserted because they are missing dependency data (other entities, used in inlined or mandatory relations). It usually helps there to find out which extids / relations are missing, so add this to the log.
-
- 20 Apr, 2017 1 commit
-
-
Philippe Pepiot authored
-
- 19 Apr, 2017 5 commits
-
-
Sylvain Thénault authored
even if there is some integrity errors while inserting entity values or setting back index/constraints, or any other errors. In case of exception, rollback to ensure we're not committing undesired intermediate state.
-
Sylvain Thénault authored
-
Sylvain Thénault authored
-
Sylvain Thénault authored
'sources' is a subpackage of 'server'.
-
Sylvain Thénault authored
-
- 14 Apr, 2017 4 commits
-
-
Denis Laxalde authored
-
Denis Laxalde authored
-
Denis Laxalde authored
--HG-- branch : 3.25
-
Denis Laxalde authored
--HG-- branch : 3.25
-
- 13 Apr, 2017 3 commits
-
-
Sylvain Thénault authored
`entity.dc_long_title()` used to fallback to `dc_title()`, and most entity types were relying on this, thus only implementing the later. Since introduction of the IDublinCore adapter, if one call `entity.dc_long_title()` on an entity that only implements `dc_title()`, it will retrieve the adapter which will then call its own `title()` method instead of the `dc_title()` method of the entity as expected. Fix this by calling instead `entity.dc_title()` which will eventually kick in the backward compat layer if necessary. --HG-- branch : 3.25
-
Denis Laxalde authored
There is a symlink in data directory (created by generate_static_dir() method) and trying to rmtree() it will fail with an OSError. So we unlink() it instead. --HG-- branch : 3.25
-
Denis Laxalde authored
--HG-- branch : 3.25
-
- 12 Apr, 2017 11 commits
-
-
Sylvain Thénault authored
--HG-- branch : 3.25
-
Sylvain Thénault authored
--HG-- branch : 3.25
-
Sylvain Thénault authored
No need for a class method and easier to get proper logger including source's name. --HG-- branch : 3.25
-
Sylvain Thénault authored
for parts which are not located in some source's check_config / check_urls method. --HG-- branch : 3.25
-
Sylvain Thénault authored
Similarly as for config. Now, ldap source validation is properly done there instead of at initialization time. --HG-- branch : 3.25
-
Sylvain Thénault authored
Reintroduce usage of 'source.check_config' which had almost disappeared, as well as tests for the currently detected errors. Part of the system source specific checking done in syncsources reimplemented in a specific check_config implementation. Tests are dispatched among ldap / datafeed and syncsources tests but are not strictly correctly located (notably syncsources tests behaviour of the native source's check_config). The system source url checking part which disappears from syncsources will be reintroduced in a follow-up. --HG-- branch : 3.25
-
Sylvain Thénault authored
which wasn't actually testing what it expected (and nothing guarantee it does now, but that's another story). Fixing this will avoid failure once we properly check the configuration. --HG-- branch : 3.25
-
Sylvain Thénault authored
* mark it private * explicit name * update docstring Private function is still called from syncsources but this will be updated in a follow-up. --HG-- branch : 3.25
-
Sylvain Thénault authored
this should be done later in the web ui, where lang is properly set. --HG-- branch : 3.25
-
Sylvain Thénault authored
Only call it when enabled instead of giving a boolean flag indicating whether it is or not (which were not correctly considered). --HG-- branch : 3.25
-
Denis Laxalde authored
It's not used anymore within cubicweb itself. --HG-- branch : 3.25
-
- 05 Apr, 2017 1 commit
-
-
Denis Laxalde authored
Most of the times we only need to retrieve one source (either by uri or eid) and querying sources_by_eid and sources_by_uri properties on repository just for one item is costly. So these methods query what's needed. We issue a ValueError (instead of KeyError for sources_by_{eid,uri} dict) in case the key is not found. --HG-- branch : 3.25
-
- 04 Apr, 2017 1 commit
-
-
Denis Laxalde authored
There's no need to convert it as a list anymore since sources_by_uri is a property and will not be modified. --HG-- branch : 3.25
-
- 05 Apr, 2017 1 commit
-
-
Denis Laxalde authored
This _entity_update method does not make sense now that we do not update source from database information but always build them afresh. --HG-- branch : 3.25
-