Skip to content

Commit 86b4081

Browse files
committed
[IMP] test for OLS03020
1 parent 24ebbef commit 86b4081

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

server/src/core/diagnostic_codes_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ OLS03018, DiagnosticSetting::Error, "Method does not exist on current model",
155155
*/
156156
OLS03019, DiagnosticSetting::Error, "Compute method not set to modify this field",
157157
/**
158-
* _name is set on a class which creaes a model, but the name is already used by another model.
158+
* _name is set on a class which creates a model, but the name is already used by another model.
159159
* Hence, this model is shadowing an existing model.
160160
*/
161161
OLS03020, DiagnosticSetting::Warning, "Model {0} is shadowing an existing model in dependencies",

server/tests/data/addons/module_1/models/diagnostics.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,12 @@ def _compute_1(self):
100100
self.test_method_search_4 = 10 # OLS03019
101101

102102
def _inverse_1(self):
103-
pass
103+
pass
104+
105+
class SameNameModel(models.Model):
106+
_name = "module_1.same_name_model" # OLS03020
107+
_description = "Model with same name as another model"
108+
109+
class SameNameModel2(models.Model):
110+
_name = "module_1.same_name_model" # OLS03020
111+
_description = "Another model with same name"

0 commit comments

Comments
 (0)