- Link fields when referred to increase idx
- This is used in search.py to rank most referred documents higher than
- This doesn't make for child table links at all.
* fix: increase folder length to 255
File `name` is 255 because it's bootstrapped using mariadb.sql, so users
can create 255 char long folders but can't store anything in it.
* fix(UX): slightly better character len message
Highlight field by making it bold.
* fix: pointless conditions about systemd/supervisor
What does this have to do with hostname?
* fix!: Overriden doctypes must inherit same base class
There is almost never a real need to completely override a class. After
this change we'll only allow extending and not overriding completely.
* perf: `Document` objects without circular references
Circular references are usuallly considered bad for GC, avoiding them
since they don't seem to be necessary.
* fix: explicitly convert to weakref
Related: https://github.com/frappe/frappe/issues/23475
Likely caused by: https://github.com/frappe/frappe/pull/22110
Because run_doc_method passes doc from client to server side, we end up
setting values for what is a "virtual field", this is why it finds some
value and not re-evaluate it.
IMO there are only mild breaking ways of fixing this:
1. Virtual fields should always be computed.
2. Virtual fields should not be set when init-ing the arguement. (e.g. from doc.set APIs )
The problem is same as mutable defaults. Container type class attributes
are mutable and shared between all objects.
```python
class CLS:
attr = {}
...
a = CLS()
b = CLS()
a.attr is b.attr # => True
```
Problem:
document.save() throws "Object is not scriptable exception" when fetching values from virtual doc.
Root cause:
```python
# ....
if frappe.get_meta(doctype).get("is_virtual"):
values = frappe.get_doc(doctype, docname) <--- Document is not scriptable.
.as_dict()
# ....
def set_fetch_from_value(self, doctype, df, values):
fetch_from_fieldname = df.fetch_from.split(".")[-1]
value = values[fetch_from_fieldname] <--- Tries to access value by key and throws "Object is not scriptable" exception
```
Solution:
```python
if frappe.get_meta(doctype).get("is_virtual"):
values = frappe.get_doc(doctype, docname).as_dict() <--- Makes the document scriptable.
```